Skip to main content

Notifications

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans