We have 2 objects,Opportunity(Parent) & Opportunity Risk (Child).When Opportunity is craeted,child gets created automatically.When child record is created we are not filling all fields on child records.there are some fields on child objects that needs to be filled by sales rep manually once opportunity is created.so when I navaigte to opportunity then Opportunity Risk and if i try to edit and save it,it thorws the validation message on Opportunity Risk.
I have a requirement inwhich I am updating Sales Person on Opportunity Object by selecting Country.Based on the different country value,different sales rep is assigned.Same Sales Person Field is craeted on Opportunity Risk also. Once the sales person on Opportunity is updated,same is updated on Opportunity Risk.This is working fine on Opportunity Record creation.It gets failed when I have update the existing Opportunity Record by changing the country.It is because we have a existing Validation Rule on Opportunity Risk that executes first and prevent us from Saving the record. Below is the validation Rule.
OR( AND( RecordType.DeveloperName = 'ABC', TEXT(Related_Opportunity__r.Source__c) = 'RFP', NOT(ISNEW()), ISPICKVAL(RFP_Q1__c, '')))
we had put this validation rule because once we edit Opportunity Risk, RFP_Q1__c needs to be filled.
so when I update the country field,it tries copy new sales person from Opportunity to Opportunity Risk but as I am not providing any value for RFP_Q1__c,it throws validation message. I want to bypass this validation whenever I am changing country and when I am on Opportunity Risk,validation should enforce.
Can someone suggest me how can i bypass validation in such requirement?