You need to sign in to do that
Don't have an account?
TN Admin
showing error in parent object if two objects have M-D/lookup relationship
Objects: Opportunity and custom object(CE) have M-D relation ship
Q: Is it possible to check the child object fields on stage change in opportunity and throw the error in parent object if child object fields are blank.
please let me know how can i achive this ...
Q: Is it possible to check the child object fields on stage change in opportunity and throw the error in parent object if child object fields are blank.
please let me know how can i achive this ...
Yes, it is possible. We can use trigger on Opportunity object. Please find below sample code.
Please let me know if that helps you.
Best Regards,
BALAJI
You can do this in two ways
- If there is a Master-Detail relationship you might be able to create a Rollup Summary field that returns a Count or SUM of a numeric value from the Child object. The numeric value would be a "score" that is set when the Child record that is editied based on the check-off criteria being true/false. Then write a VR on the Opportunity that evaluates the Opportunity Stage and the RS Field and throws an error if the RS(Score) is not sufficient.
- if youcreate a Lookup field that connects the Opportunity to the second object, remove the master detail relationship, You can just use some standard validation rules.
Please mark this as the best answer if this helpsYou can use trigger approach to accomplish this.
Just replace Custom_Object__c with your child object API name and field__c, field1__c, field2__c with the fields on this custom object.
Thanks,
Pankaj