You need to sign in to do that
Don't have an account?
How to write a trigger to compare two fields from two different objects in salesforce?
Hi,
SObject1--> Num1(number field)
SObject2--> Num2(number field)
Here Num1value> Num2value i want show an error at Num1 field
Num1value <=Num2 value i dont want to show an error
will you please help me for this
Thanks,
NANDIREDDY NAGARJUNA REDDY
SObject1--> Num1(number field)
SObject2--> Num2(number field)
Here Num1value> Num2value i want show an error at Num1 field
Num1value <=Num2 value i dont want to show an error
will you please help me for this
Thanks,
NANDIREDDY NAGARJUNA REDDY
Does these objects have relationship...!!
You dont need a trigger for this. If you create a validation rule on Objx
Objx.Num1 > Objx.ObjY.Num2
Where Objy is the parent object and Objx is the child object and you can create this rule on the Objx. So whenever the value of Num1 is greater than Num2 whether you create a new ObjY record and associate to the Objx record or update Num1 on Objx or Num2 on Objy, will fire.
Thanks
Anupam Bansal