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

Lock Field based on Time

(0) ShareShare
ReportReport
Posted on by 169

I am looking for help related to the below. We use the Customer Service app to track our daily one-day projects using the Case entity. Here we have a Date & Time field “Deadline” where we keep the estimated date and time that we are planning to resolve the case. We are planning to lock this field so that a user will not be able to edit this field and another field 1 hour prior to the “Deadline”.

Is this possible and can you guide me with a few ideas if this is possible?

  • HenryBinan Profile Picture
    169 on at
    RE: Lock Field based on Time

    Thank you Dian (dian74). I tried this solution and the workaround works perfectly. This is very helpful and thank you for the prompt response.

  • HenryBinan Profile Picture
    169 on at
    RE: Lock Field based on Time

    Thank you Moximox for the ideas and suggestions.

  • Verified answer
    dian74 Profile Picture
    2,475 Most Valuable Professional on at
    RE: Lock Field based on Time

    Hi Henry, 

    You would be able to accomplish part of this with a work around where you would use a calculated field to determine how much time was left on the deadline and lock the deadline field based on that, but the issue with this is that if the time that is left in the deadline goes from 61 mins to 60 mins the field will not lock automatically, there would need to be a page refresh for this to happen. If you don't care about the locking of the field, and just don't want people to be able to change the data in the deadline field I would go with the following approach:

    • Create 'Deadline' column - date/time - user local
    • Create 'Deadline Time Left(mins)'- whole number - calculated field
      below is a screenshot of how to configure the calculation in the field

    pastedimage1657112520428v1.png

    Lastly I would create a Realtime workflow that triggers after the 'Deadline' field has been changed with a check condition as shown below. This work flow will show an error if there is 60 mins or less of deadline time left. 

    pastedimage1657112708772v5.png

    Please mark verified if this helped solve your issue.

  • Suggested answer
    Moximox Profile Picture
    2 on at
    RE: Lock Field based on Time

    Yes it is possible and a common feature  to set deadlines or sla limits. You would use powerautomate, logic apps or classic workflow. You trigger based on scheduled time or simpler run flow every 15 minutes or other interval checking for any date time that has passed and still have unlocked field. If unlocked then you add action to lock field.

    Good luck and let me know if you need further support.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June 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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans