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

Community site session details

Session Id :
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?

(0) ShareShare
ReportReport
Posted on by 26

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.

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 74 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans