Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Give Temporary write access to an entity

Posted on by 445

How to provide a temporary write access to an entity?

Eg: Once the user saved a record in an entity, write permission on that entity should be removed automatically.

Is it possible to achieve this using Jscript or plugin.

Thanks

  • Elangamban Profile Picture
    Elangamban 445 on at
    RE: Give Temporary write access to an entity

    Any sample code is available of how to update it.

    Thanks for the reply.

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Give Temporary write access to an entity

    Ok then do this. Create 2 security roles - exactly identical - one will have right privilege to entity B & other won’t. Assign/revoke necessary security role to user(s) based on your need.

    You can try 2 teams with 2 different roles, add/remove the member to that team based on your condition.

    You can do this on post update plugin. Pls understand this comes with overhead of POA entries.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Give Temporary write access to an entity

    Hi Elangamban,

    Have you tried my suggestion?

  • Elangamban Profile Picture
    Elangamban 445 on at
    RE: Give Temporary write access to an entity

    Any further suggestion on this.

    Thanks.

  • Elangamban Profile Picture
    Elangamban 445 on at
    RE: Give Temporary write access to an entity

    Even if they're doing multiple transactions in Entity A, if permission is already provided, need to skip the permission assigning step.

    Once Entity B is saved write permission on Entity B needs to be removed.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Give Temporary write access to an entity

    Create/ Edit is an action which can be done multiple times i.e. user can create records for Entity A again and again, how do you want to handle this scenario as with your automation, you would have give the rite access to Entity B when User created the record for the first time?

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Give Temporary write access to an entity

    Can you explain this bit "unless Executive is Create/Edit Entity A"?

  • Elangamban Profile Picture
    Elangamban 445 on at
    RE: Give Temporary write access to an entity

    Hi,

    I have two entities A and B. I don't want to give write permission to Entity B until unless Executive is Create/Edit Entity A. When saving the Entity A I want to give write permission to Entity B. Once Entity B is saved I want to again revoke write permission. 

    This needs to be automated. How to achieve this?

    Thanks

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Give Temporary write access to an entity

    Hi Elangamban,

    All you need to do is give a user a security role with Create and Read privileges for an entity but no Write privileges. It meets your requirement without adding unnecessary complexity.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Give Temporary write access to an entity

    Hi,

    You may also think  some alternate way like creating field or identifying created by records availability for particular user in the entity. If the record is available throw exception from create plugin.

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 Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans