0

We are in the process of going multicompany in SF and separating company information by RecordType. Two of our companies have substantially similar business processes and the customizations we have in place for our parent company would largely apply to the new company.

We currently send an assortment of emails by using distribution lists in the Additional Email section of the Email Alert.

I'm wondering if there's a way to reuse the same Workflow Rules, Email Alerts and Email Templates by dynamically changing the Additional Email distribution list based on the RecordType of the Object.

We do have a custom Entity (Company) object where we could potentially store the appropriate distribution lists and reflect them on each Object with a formula field, but the Email Alert wouldn't recognize it as an Email Field.

Any thoughts or suggestions on this would be most welcome. Possibly the answer is that I need to suck it up and create an entire separate set of Workflow Rules/Email Alerts, but I'd prefer to avoid that if possible.

  • Just as one creates or clones a page for a new Record Type and then changes the properties on fields as appropriate, I'd expect most of what you need to do would be essentially the same or similar type of process. – crmprogdev Jul 1 '15 at 14:58
0

The Email Alert 'Additional Emails' is a text field and can't be modified dynamically.

Workaround

  1. Create a custom field Distro_List__c of type Email on each Sobject that participates in a workflow.
  2. Create a trigger and trigger handler for each of these SObjects.
  3. The trigger handler (which can be generalized) populates the Distro_list__c on all before insert and before update events based on awareness of the Company in the transaction. Make sure this is all bulkified so a batch of multiple records but of different Companies properly sets Distro_List__c
  4. Refer to the Distro_List__c field in the Recipient Type | Recipients section of the email alert
| improve this answer | |

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.