locked
Mark Records as Read Only... RRS feed

  • Question

  • Hi,

    I have a requirement from a client to be able to "lock" certain records (opportunities and some custom entities) once they receive a certain status.  Say an opportunity is set to a status of "Not Won" or something similar, it should be "locked" or made "read only" to prevent any future updates to that record.  They also request that it be possible for an administrator to "unlock" the record if required.

    I am still learning with CRM so I ask is there any provision for this in CRM development..??  I would have thought it was a fairly common scenario...

    Kind regards,
    Jack
    Monday, November 26, 2007 11:34 PM

Answers

  • This is done via the standard state settings in CRM. Each entity has a set of possible statuses, one or more of which makes the record read-only. The opportunity entity has 3 states (open, won and lost); if it's won or lost it can't be modified.

     

    Most entities allow the state to set back to an active state ('unlocking' in your terms), but the CRM security model does not allow specific permissions for this. There should be a code route to do this; you could write a PreSetState callout which runs as a user tries to change the state, and if they shouldn't have rights cancel the operation.

     

    See the CRM SDK for more on callouts

    Tuesday, November 27, 2007 8:57 AM
    Moderator