Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Security Role in dynamics 365

(0) ShareShare
ReportReport
Posted on by 1,081

Hello Community Experts

There is an urgent requirement where "When the status of the record is set to suggested, only users with delegate security role should be able to update the record"

How do i achieve this?

Kindly guide

Best Regards,

Sumaira Noor

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,081 on at
    RE: Security Role in dynamics 365

    Thanks a lot for the response Ana and Vivek

    Vivek as you suggested i was also wondering if I'll be able to achieve this requirement using the JavaScript

    Since i have already worked on disabling fields i know how to disable

    Could anybody please advise on how to check the user roles and if the user don't have delegate role using javascript

    Kindly advise

    Best Regards

    Sumaira Noor

  • Suggested answer
    Vivek Viraj Profile Picture
    Vivek Viraj 60 on at
    RE: Security Role in dynamics 365

    Hello Sumaira,

    1. You can do this using script on load of the form where you need to check the user roles and if the user don't have delegate role then make all the fields disable through the script else do nothing. (you can find the disable all form fields script easily)

    2. If you want to restrict by all means then you can write the pre-validation plugin and check the roles of the user and if delegate roles are not there you can throw the error.

    Hope this helps.....

    Happy To Help

    Vivek Viraj

  • Suggested answer
    Ana Almeida Profile Picture
    Ana Almeida on at
    RE: Security Role in dynamics 365

    Hello Sumaira Noor,

    To do it, we need to use custom code. It isn't possible achieve this just with OOF functionalities.
    My suggestion will be create a Plugin/ Workflow that is triggered when status reason is updated to 'Suggested'.
    To change the security role associated to a form via SDK, it is necessary:

    1. Edit FormXML attribute of system form record
    2. In form\DisplayConditions element set FallbackForm="0", to disable fallback
    3. Add role element for each enable role

    See msdn.microsoft.com/.../gg327975.aspx for more on the FormXml schema.

    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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans