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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Lock &Unlock the date and time

(0) ShareShare
ReportReport
Posted on by 10

my question is consider a two fields arrival date and departure date these fields are date and time  data type , by default departure field is lock when insert a date on arrival field then departure field has to unlock.

I have the same question (0)
  • Suggested answer
    ONENEXT Profile Picture
    10 on at

    I need a js code .

  • Suggested answer
    Nya Profile Picture
    29,064 on at

    Hi,

    The code is something like the following snippet.

     

    function setDeparturedate (executionContext) {
      var formContext = executionContext.getFormContext();
      formContext.getControl("new_departuredate").setDisabled(false);//Use the name of the field
    };

    Please set it on the OnChange event of the "Arrival Date" field.

     pastedimage1624246246801v1.png

    Then the "Departure Date" field can be unlocked when "Arrival Date" field has been changed.

     pastedimage1624246250390v2.png

    pastedimage1624246256599v3.png

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • meelamri Profile Picture
    13,218 User Group Leader on at

    Hello ONENEXT,

    Please share some screenshots and the technical name of your fields...It will help to solve your issue

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 156

#2
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans