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
SFSF 

Editing Sales Order Opportunity Field after record type changes

Problem Statement: “When a Sales Order has been billed users cannot attach an Opportunity to it”
We want our users to be able to add opportunities to the Sales order, even when the record type changes to  Locked Sales Order after it is billed.
 3 Profiles are being impacted. 
 
how can I achieve this requirement.
Thank in advance.
Best Answer chosen by SF
AnkaiahAnkaiah (Salesforce Developers) 
Try with below validation rule.
AND(Text(Sales_Order_Status__c)='Billed', ISCHANGED(Sales_Order_Opporunity__c),OR($Profile.Name <> 'Profile1',$Profile.Name <> 'Profile2',$Profile.Name <> 'Profile3'))

If this helps, Please mark it as best answer.

Thanks!!

All Answers

AnkaiahAnkaiah (Salesforce Developers) 
Hi Hafsa,

Try with validation rule on Salesorder object.
AND(Text(Sales_Order_Status__c)='Billed', ISCHANGED(Sales_Order_Opporunity__c))
If this helps, Please mark it as best answer.

Thanks!!
 
SFSF
But i want onyly 3 profiles to have the edit acess. how should i achieve that?
AnkaiahAnkaiah (Salesforce Developers) 
Try with below validation rule.
AND(Text(Sales_Order_Status__c)='Billed', ISCHANGED(Sales_Order_Opporunity__c),OR($Profile.Name <> 'Profile1',$Profile.Name <> 'Profile2',$Profile.Name <> 'Profile3'))

If this helps, Please mark it as best answer.

Thanks!!
This was selected as the best answer
SFSF
Thanks. i will try and update.