function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Atul Shendge 2Atul Shendge 2 

When Record is submitted as Draft. Profile should have edit access for that Draft

Hi All,

When Record is submitted as Draft. Profile should have edit access for that Draft.
Two profile: P1 and P2. Two page layout created for both profile one is read only and other Read/Write access. When P1 submit a record as status is saved as Draft . P1 should have access to Edit that record.

Page layout in detail page if I had Edit button. It assign to both the page layout. Is there any other way around to achieve this.

Thanks for the help in advance
Best Answer chosen by Atul Shendge 2
Andrew GAndrew G
If your plan is that one group of users (P1 profile) create the records and the other group of users (P2 profile) can only ever read the records, on the layout for P2 remove the edit buttons.  Then assign the layout to that profile.
Or, depending on the complexity of the layout (number of fields) you could simply go through the P2 layout and make every field Read Only on the Layout.

You could also check the object level security to make the entire object  Read Only to the P2 Profile.
You could also dive into Field Level Security, making the fields read only to that P2 profile.  

If your business process needs to be when a User creates a record it is in Draft status.  Whilst it is in Draft status, only the original author can edit the record.  Once it is no longer in Draft status, then other users can read and/or edit.
If so, investigate sharing settings.   Set the OWD to private for the record.  Then set a sharing rule for when the status no longer equals draft it is shared with other users.  This would mean implementing Roles or ensuring all P2 profile users are in a Public Group.

The other option is to do the 2 x page layouts, one without the buttons.  Do 2 x Record Types, "Draft" and "Normal", and have a process builder change the record type when the document is no longer draft to the "normal" record type.  Ensure that you have the "editable" layout assigned to the profile based on record type.


So, depending on the exact business need, you could resolve the issue in a few different ways.  There are pros and cons for each.

Regards
Andrew