Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to look at a field and see if that value of the field matches the name of the logged in user?

Posted on by 2,645

I have new contract entity that I created which sits below the Account entity.  On this new Contract form, I have a field called, "Status".  I need only certain teams to be able to create a Contract record.  When the status = Active or Expired, I need a way to check to see if the user logged into CRM matches either the Account Rep value field or the Coordinator value field on the Account record.  If it does, then they should be allowed to modify any field on the Contract record. if status = Termed, then all fields get locked and no one can edit the record.

Wasn't sure the best way to get this to happen.  Any advice is appreciated, thank you.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How to look at a field and see if that value of the field matches the name of the logged in user?

    Hi,

    For the first first "Restrict creation to specifc users", this can be controlled by creating/assigning a security role which has create permission for your contract entity (ensure users are not assigned with any other security role which has create permissions).

    www.youtube.com/watch

    docs.microsoft.com/.../security-roles-privileges

    Second, "Restriction on update to only Account Rep &  Coordinator", you can create a real time worlfow, which triggers on change of modified on field, within the workflow check if the modified by is not equal to Account Rep or  Coordinator then cancel the workflow and throw error.

    community.dynamics.com/.../using-real-time-workflows-to-show-error-messages

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans