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
yash mehta 12yash mehta 12 

How to solve this requirement? should i use workflow or process builder or validation rule?

for Opportunity Products that are related to an Opportunity Type of Contract Renewal or Contract Renewal-Modules, we don't want users to be able to save the product if the Amount ARR Renewed field is blank.
Best Answer chosen by yash mehta 12
Shruti SShruti S
Here is how you should be writing the validation rule on the Opportunity Product object - 
(TEXT(Opportunity.Type) == 'Contract Renewal' || TEXT(Opportunity.Type) == 'Contract Renewal-Modules') && ISBLANK(Amount_ARR_Renewed__c)
Feel free to ask if you have any more doubts.

All Answers

Shruti SShruti S
This can be done with the help of Validation Rules. If you could give me the Schema, I can generate a validation rule and give you. I wanted to know in which object is the Amount ARR Renewed field in.
yash mehta 12yash mehta 12
Amount ARR Renewed field is in opportunity product.
Shruti SShruti S
Here is how you should be writing the validation rule on the Opportunity Product object - 
(TEXT(Opportunity.Type) == 'Contract Renewal' || TEXT(Opportunity.Type) == 'Contract Renewal-Modules') && ISBLANK(Amount_ARR_Renewed__c)
Feel free to ask if you have any more doubts.
This was selected as the best answer
yash mehta 12yash mehta 12
User-added image
Hey, shruti why it's showing an error?
yash mehta 12yash mehta 12
Hey shruti 
Amount ARR Renewed field is in opportunity product and i have to create validation rule in opportunity product(Amount ARR Renewed) and Type is in Opportunity.
Shruti SShruti S
What you are doing is incorrect. Please create a validation rule in the Opportunity Product object. Here is how you should be doing it -

User-added image
yash mehta 12yash mehta 12

Thanks, shruti.
I will keep in touch with you. 

Can I get your email?  So I can be in touch with you.

Thanks