You need to sign in to do that
Don't have an account?
Venkat aditya
when lookup values doesn't change means error should display using trigger
Hi,
I have 2 Lookup fields in object.
I have selected values for 2 lookup fields, and saved.
Now if i want to edit that record, at that time if i am entering same look up values(not changing lookup values) means it should display an error that "Same set of values are Entered, please change the lookup values"
I am thinking that we can done this through trigger.
Can any one help with this scenario.
Thanks in advance.
I have 2 Lookup fields in object.
I have selected values for 2 lookup fields, and saved.
Now if i want to edit that record, at that time if i am entering same look up values(not changing lookup values) means it should display an error that "Same set of values are Entered, please change the lookup values"
I am thinking that we can done this through trigger.
Can any one help with this scenario.
Thanks in advance.
Below is code snippet, please use this : - Thanks
All Answers
Hi Venkat,
Sorry for late response,
At your requirement, Trigger logic would give result : -
1. Whenever child object is updated and its lookupfield old values are equal to lookupfield new values, then Trigger will fire to generate an validation error : - Same set of values are Entered, please change the lookup values
2. Suppose, you edit the child Object and doesn't touch lookup field value, Trigger will again generate error. because lookup field before update to child object have same value .
Please let me know, once you get understand the outcome of trigger logic, if implemented on your requirement.
Thanks
Below is code snippet, please use this : - Thanks
Thanks for your solutions.