1

I have an object which is a child of Contacts (M/D relationship) , I want to generate an automated email if no new records are created in the child object withing two days.

has anyone come across something like this or has any idea how I can do this ?

I'm new to Salesforce/Stackexchange and would appreciate any ideas or assistance.

Thank you

3
  • Darn! If the object was in fact a child of Case, that would be a great use for Escalation Rules. – bigassforce Nov 3 '14 at 21:03
  • within 2 days of createdDate? or within 2 days of lastModifiedDate? That is, how many times during the lifecycle of the Contact could the email be sent? – cropredy Nov 3 '14 at 22:17
  • withing 2 days of the createddate , this email would be sent once. just to remind the user that a new record has not been created. – Abdullahi Nov 4 '14 at 5:27
2

You can create a roll up summary field on the contact, and a workflow that triggers on (roll up field = 0). Set a delayed action for two days after create date with the email template of your choice.

3
  • Hey sfdcfox, I had thought of that but couldnt quite figure out the rest. As there will always be records in the child object. – Abdullahi Nov 4 '14 at 5:31
  • So you mean to say that every two days a new record must be made? That could be a combination of trigger and workflow rule, then. Trigger on insert of child to update parent record with the created date, then a workflow that sends out notifications two days after that field value. – sfdcfox Nov 4 '14 at 5:38
  • Yeap new record every two days, Thank you sfdcfox, I will look into that solution – Abdullahi Nov 4 '14 at 5:41
0

Through batch job which may scheduled to run every hour. Scope will be those contact records which have created date = system.now().adddays(-2) AND don't have any child records. Shoot an email for bunch of records or individual record.

See ending email though batch here: send email to users from a batch job

Thanks, SP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.