You need to sign in to do that
Don't have an account?
Tillu
How to compare 2 object fields?
I have "price" field in one object, and i have "Amount" field in other object. So now i want to compare "price" value within 10% of the associated object record’s "Amount" . If the match occues then i need to update a field. But how to compare these fields for 10 % .
Once you get the value in the trigger - you can then compare using
if (pricevalue <= (10*Amount value)/100)) {update the field}
Hoping I'm able to understand your requirement..
All Answers
Are these object related? If yes, then you can setup a workflow for this requirement.
If not, then set up relationship first and then create a workflow with action field update.
You can write a trigger on both the objects to check if whenever the price and amount field are updated - the 10% rule is checked and the corresponding field can be updated.
Once you get the value in the trigger - you can then compare using
if (pricevalue <= (10*Amount value)/100)) {update the field}
Hoping I'm able to understand your requirement..