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 existing records based on condition from a different Entity

(0) ShareShare
ReportReport
Posted on by 50

Hello, 

I have an entity called   "Exam" and within this entity I have a look up field called "Exam Number".  This look up field "Exam Number" Entity has  the following fields

  • Exam Number
  • Exam Start Date
  • Exam End Date 

Once the teacher enters "Exam End Date" on this Form (Entity); it should lock the entire "Exam" Form (Entity). There can be multiple existing Exam Records with same Exam Number. So this feature should lock multiple records when teacher enters Exam End Date.  

Can this be done without Java script? If not, please also help me out with the code. 

I have the same question (0)
  • Suggested answer
    Francisco Murtinheira Profile Picture
    Microsoft Employee on at

    Hello,

    So in order to achieve what you want you can use either a plugin or a flow.

    In both scenarios the logic would be similar, you trigger your process on the update of the ExamNumber when the End Date is populated. Then you query all Exams that have the lookup field to the ExamNumber where the process triggered, and change the status of all these Exams to Inactive.

    You can use this flow as an example of the logic. Keep in mind that this flow is just a sample and does not currently work, but you can use it as a base to build your own.

    pastedimage1603969183662v1.pngpastedimage1603969280534v2.png

  • Suggested answer
    Henry J. Profile Picture
    5,237 on at

    Hi Emanuel,

    Have you also explored using Calculated Fields and Business Rules?

    For example, an "Exam End Date" date calculated field on the "Exam" entity could be equal to the related "Exam Number"'s "Exam End Date".

    Then have Business Rules that locks the "Exam" fiels in case "Exam End Date" contains data.

    Henry

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
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 45 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans