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
Sanjana RajasekarSanjana Rajasekar 

Validation Rule for Manufacturing Cloud

I am trying to add a validation rule which says
User shouldn't be allowed to add Products in Sales Agreement Object that created from Closed won opportunity and Sales Agreement type = Commerical SA
 
Best Answer chosen by Sanjana Rajasekar
SwethaSwetha (Salesforce Developers) 
HI Sanjana,

Considering Sales Agreement type is recordtype, Try below validation rule
AND(
RecordType.DeveloperName = 'Commercial_SA',
Opportunity.StageName = 'Closed Won',
ISNEW(),
NOT(ISBLANK(Products__c))
)

Related:https://developer.salesforce.com/docs/atlas.en-us.242.0.mfg_api_devguide.meta/mfg_api_devguide/sforce_api_objects_salesagreement.htm

https://trailhead.salesforce.com/content/learn/modules/sales-agreements-forecasting-manufacturing-cloud/create-sales-agreement

If this information helps, please mark the answer as best. Thank you