web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Set End Date from Start Date in addition of months from a field using js

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I have requirement where I need to set End Date from adding number of terms (which is in months) and Start Date.

Please find the image below... as we can see the term is 6, and start date is 1/1/2021.. so I want to add 6 month to start date (i.e. 1/7/2021) and set this into the field Lease End Date

pastedimage1635153208753v1.png

Regards, 

Shoaib Khan

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi ShoaibKhan,

    You can refer following link:

    Adding Days/Months/Years to Date field in CRM using JavaScript – Murali Sabbavarapu CRM Blog (wordpress.com)

    Note:

    the Xrm.Page has been deprecated, you need use following syntax to replace:

    formContext.getAttribute(arg).getValue()

    formContext.getAttribute(arg).setValue(value)

  • ShoaibKhan Profile Picture
    55 on at

    Thanks Leah Ju,

    It was very helpful....

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 45 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans