0

I am having an Opportunity object there is a field named "stage(picklist)", when I selected "selected won" from picklist "amount" field must become "read only"

3

As an alternative, you could also create a validation rule that doen't allow changes to the amount field when the stage is in Closed Won.

So for example:

AND( ISPICKVAL(StageName, "Closed Won") , ISCHANGED(Amount) )

The dis-advantage with this solution however is that your user will only get this error message on-save while with a record type / page layout change, they would immediatly see that they can't change the amount field anymore.

An advantage is though that you don't need a seperate recordtype / page layout to maintain.

Probably depends if there would also be other fields that users would not be allowed to change anymore, then a recordtype / page layout would be better. If it's only one field that they can't change anymore, validation rule would be easier to maintain.

2

You can do this by assigning a different record type with a workflow. This record type would have a separate pagelayout with the fields you require to be read only set as such.

  • +1 Sdry : Create a page layout i.e clone the exsiting page and make amount read only on the cloned page layout. Now write a workflow field update with condition if stage=selected won.it has to populate cloned page. here is the link for detail explaination.success.salesforce.com/answers?id=90630000000gilKAAQ – Sindoora Jan 29 '14 at 10:54
0

You may have to explore VisualForce pages. You can embed one in the Opportunity layout and have it act upon your fields.

Having said that, I would recommend allowing the user change the amount until the record is actually saved, in which case a few of the solutions mentioned above would do.

0

You give a try with validation rule for your case with reference to this example - http://www.techlogbooks.com/2019/02/how-to-prevent-changes-to-field-in.html

  • Welcome to SFSE. Please read How to Answer and edit this post so that the complete solution is described here. Links can go dead and we ask that users not need to navigate away to understand the solution. – David Reed Jul 27 '19 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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