Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Prevent write per record dynamically

  • 1.  Prevent write per record dynamically

    Posted 13 days ago
    Hello Community,

    I have a situation in which i need to set a record inactive for user input but active for input from sys admins.

    The situation is I have a custom entity which my sales individuals relate contact records to in order to list them against a specific task, kinda like a marketing list, but custom. The sales people have until a specific date to get the information in and then the record for entry needs to go "inactive". I however need the ability to add additional people to the list without giving them access again if asked by supervisors to do so. I thought about just deactivating the record but then i cant add to it, and because they need write privilege, they could just reactive themselves as well.

    I'm assuming i am going to need Jscript to lookup the user and check their security roles, and ultimately if they arent a sys admin and it is outside the deadline, to set the record read only somehow but im looking for guidance to this issue.

    It is important to note that there can be multiple task lists running concurrently so one list may be outside the deadline but another could be still active so i cant restrict the write privilege across the board or have a solution that is all or none on the entity.

    Thanks for any input to this issue.

    ------------------------------
    Erik Seitz
    RJ Corman Railroad Group, LLC
    Nicholasville KY
    ------------------------------
    Conference-CRMUG_200x200


  • 2.  RE: Prevent write per record dynamically

    TOP CONTRIBUTOR
    Posted 12 days ago
    There's a few ways that come to mind, in no particular order. In each case you'd need to link the user to their security roles to work out whether to disable the form.

    1. In Javascript, disable each control on the form. This is probably the simplest method, but wouldn't prevent the user editing the record if they were determined
    2. Attach a plugin to the Retrieve step and change the statecode attribute to indicate that the record is disabled. The form should automatically change to the disabled form
    3. Attach a plugin to the Update step and throw an error if the user attempts to update the record
    4. Attach a synchronous workflow to the updating of any field on the record and stop the workflow with an error
    1 and 2 will handle disabling the user interface, while 3 and 4 will stop an update coming through if the user manages to bypass the standard UI.

    ------------------------------
    Mark Carrington
    Chief Technologist
    Data8
    Chester
    ------------------------------

    Conference-CRMUG_200x200


  • 3.  RE: Prevent write per record dynamically

    SILVER CONTRIBUTOR
    Posted 12 days ago

    Instead of jscript to inspect roles, change how you approach this so that you change the role ownership to a person or security team that is at a higher business unit level than all the other users.  We use this approach extensively to keep records open that some people in the company can still update, but not the sales people.  A sys admin is at the highest business unit level typically – so you would be able to edit it. As long as your reps are in a lower business unit level you can control record edit rights in this manner without resorting to exotics.

     

     

    The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.



    Conference-CRMUG_200x200


  • 4.  RE: Prevent write per record dynamically

    Posted 11 days ago
    If you want to only allow true systems admins to make changes, then take a look at Winvision Dynamics Tools
    It installs into the browser (only Chrome) rather than Dynamics and has a 'God Mode' feature which when turned on for a record overrides the record state for the user for the duration of the changes.
    It only saves things when you come off the record (or auto save takes place) and then switches back to normal mode.

    ------------------------------
    Paul Smith
    SSAFA
    London
    ------------------------------

    Conference-CRMUG_200x200


  • 5.  RE: Prevent write per record dynamically

    Posted 11 days ago
    It feels like it should be possible to do this using access teams.
    Assuming you had a default read/write team added to each record and populated with members, you could then use something like D365 Workflow Tools to remove users from the access team at a given point, i.e after a duration.
    You could potentially have them 'fallback' to a default read only team assuming both had been added to each person initially. D365 workflow tools has a number of options for sharing records with a team, adding removing members etc so this concept could be possibly using a combination of them to achieve something.
    Never tested any of this though, am just guessing at what might be possible.

    ------------------------------
    Jamie Parbery
    Kier Ltd
    Northants
    ------------------------------

    Conference-CRMUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role