+ Start a Discussion

Need Trigger On Contact for this scinario?

Policy is Detailed object and contact is Master , they are in master detail relationship. we can  create policy records from  contact  related list.

On policy  i have a field   "issue Date". and on contact i have checkbox field  "Current Year".

 suppose if i have created 2 policy records from contact related list, this means  contact  has 2 associated policy records. if  that 2 policy records "issue Date" is "equal or less than 60 Days" then the contact checkbox(Current year)  field should be True (Checked).

Need Trigger For this?




You can achieve this with cross object workflows. Create a workflow on Contact object, apply rule criteria and make field update.





I dont know how to create please provide sollution.


Hi Tillu, 


I do not assume this is directly possible, however you may add a field on the Conatct Object which will be updated when the criteria meets. 

You may have to write a class which queries the child records with the master record common in it and filter out the required criteria. the result retrived would determine if the check box has to be updated or not through a trigger. 


You may see some sample related code using rollup summary field in the link below, 







s there any possibility of trigger?


ive me steps for cross object workflow?


Hello Tillu,


Cross object workflows are created as normal workflows. Refer following help document for workflow creation:




For cross object Field update refer: http://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US