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
Harsit Agrawal 7Harsit Agrawal 7 

edit access of fields on child object depending on the field on parent object.

I have a custom object 'Sales_Quote__c' and other 'sales_Quote_Line_Item__c'. There is a master details relationship on 'sales_Quote_Line_Item__c' (sales_Quote__c). Now I want to make the Detail object, i.e., 'sales_Quote_Line_Item__c' editable depending upon the 'sales_Status__c' field on Master object 'Sales_Quote__c'.

'sales_Status__c' is a picklist field with values:
Draft
In Review
Manager Approved
Customer Accepted
Customer Rejected

I want that the user should not be able to edit the Quote Line Items once the quote status is beyond 'Manager Approved'. Is it even possible? If yes, please suggest something.

CharuDuttCharuDutt
Hii Harsit Agrawal
Try The Following Validation Rule on "'Sales_Quote_Line_Item__c"
IF( OR( ISPICKVAL( Sales_Quote__r.sales_Status__c, 'Customer Rejected'),ISPICKVAL( Sales_Quote__r.sales_Status__c , 'Customer Accepted') ) ,true,false)

And At The Bottom Of The Page On Error Location Section Select Feild Option And Select The Field Which You Want User Should Not Be Able To Edit
Please Mark It As Best Answer If It Helps
Thank You!