Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

JavaScript code for Formula field

(0) ShareShare
ReportReport
Posted on by 37
Good Afternoon All,
 
I am new to Dynamics 365 CRM and I am trying to create a formula (Calculated) field that counts the number of days between two dates (created on date and today), not counting weekends.
I am not a developer and do not know how to write JavaScript. I have tried code generators but they did not help much.
Does someone have a JavaScript code that they can and would be willing to share with me?
 
Thank you
Shawn Low
  • Leah Ju Profile Picture
    Microsoft Employee on at
  • Suggested answer
    Adrian Begovich Profile Picture
    1,025 Super User 2025 Season 1 on at
    JavaScript code for Formula field
    Hi Shawn,
    You can find JavaScript code that does this here.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Product updates

Dynamics 365 release plans