function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TilluTillu 

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?

Vinita_SFDCVinita_SFDC

Hello,

 

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

 

 

 

anvesh@force.comanvesh@force.com

I dont know how to create please provide sollution.

Ashish_SFDCAshish_SFDC

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, 

http://www.anthonyvictorio.com/salesforce/roll-up-summary-utility/

 

Regards,

Ashish

 

anvesh@force.comanvesh@force.com

s there any possibility of trigger?

TilluTillu

ive me steps for cross object workflow?

Vinita_SFDCVinita_SFDC

Hello Tillu,

 

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

 

https://success.salesforce.com/ideaView?id=08730000000BrHAAA0

 

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