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
snehal waghmare 3snehal waghmare 3 

hi need help to make field required

i want to make quote object field required depend on opportunity order type picklist value need solution
Best Answer chosen by snehal waghmare 3
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Snehal,

You have to create validation rule on Quote object as below.
 
AND( ISPICKVAL( Opportunity__r.order_type__c ,'New') , TEXT( Type__c )='')

Replace the Object Api names according to your org.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Snehal,

Are both the fields on same object? 

Based on it we can use validatiorule or Trigger.

Can you provide more details on which objects these were present and relation between these two objects.

Thanks,
 
snehal waghmare 3snehal waghmare 3
order type is on opportunity object depend on this picklist value need to required quote object field
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Snehal,

I hope Quote is child object and you have opportunity Lookup field on Quote to populate Oportunity?

Thanks
 
snehal waghmare 3snehal waghmare 3
hi sai

yes that is correct

thanks

 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Snehal,

You have to create validation rule on Quote object as below.
 
AND( ISPICKVAL( Opportunity__r.order_type__c ,'New') , TEXT( Type__c )='')

Replace the Object Api names according to your org.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
This was selected as the best answer