0

In my Salesforce there is a Submit for approval process for the Opportunity object. I want certain fields in the Opportunity record to NOT be editable during the approval process. In order to achieve that I've implemented an apex code. The issue here is that the fields remain editable via inline editing. How can I make such fields ABSOLUTELY NOT editable via the inline editing but ONLY during the submit for approval process?

  • so some fields will be editable in Opportunity and some are not at all editable including inline? – Santanu Boral Nov 10 '16 at 22:12
  • Indeed, that is exactly right. I want some fields to be editable in Opportunity and some to be not at all editable including inline but ONLY during the approval process. When the approval process is over I want all fields in Opportunity to become editable again including the inline editing. – digital mindfield Nov 10 '16 at 22:23
0

How did you make the fields read only via apex code?

It sounds like you should be using a standard approval process with the record being locked on submission.

You can also deactivate inline editing in user interface.

You can also create a validation rule to catch people trying to edit the record.

  • Thank you for your comment. I don't think what you suggest will solve my query. The only way I see it my query to be fully achieved is via custom coding. In other words I'm trying to find out how to set certain Opportunity fileds to NOT be editable during the approval process by using apex code especially the part which concern the inline editing. – digital mindfield Nov 10 '16 at 23:35
  • Just clarification, by not editable, is an error on save acceptable or do you want people to not even be able to double click on the field? – Nonick Nov 15 '16 at 0:22
  • I would like to achieve the second to NOT even be able to double click on the field – digital mindfield Nov 15 '16 at 21:48
  • Only way to achieve this I can think of iis via a page layout modification. Modify the page layout to have the field as read only and assign it to a dif record type called "submitted record" or something. Assign page layout to the record type and trigger the record type change from apex or workflow. PageLayout restrictions are enforced on list views. – Nonick Nov 17 '16 at 1:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.