I am trying to create a way to use templates and merge fields on custom objects just like you can use merge fields on email templates using text fields and a field updates.

For example:

I have 2 custom objects named Message__c and Message_Template__c.

Message__c has 3 custom fields:

  • Template__c (Lookup Field to Message_Template__c)
  • Msg__c (Long Text)
  • First_Name__c(Text)

Message_Template__c has 1 custom field:

  • Msg_Template__c(Long Text)

Currently I have a process builder setup that when Message__c.Template__c is updated with a Message_Template__c record, Message__c.Msg__c is updated with the contents of Message_Template__c.Msg_template__c.

I am looking for a way to use the reference Message__c.First_Name__c on the Message_Template__c so that when it updates Message__c, it will update with the value of First_Name__c embededd in the String.


Message_Template__c.Msg_Template__c = "Hi {!First_Name__c}, How are you doing?"

Translates to

Message__c.Msg__c = "Hi Frank, How are you doing?"

I do have a work around using two fields to create the string, but I need a better solution, because i am planning to use a lot of these "merge fields" if i can get this to work.

I hope this question is clear! Thank you all for looking at this.

  • 1
    Hi Thaier, welcome to SFSE. Please take a moment to scroll through the tour and read How to Ask. The more specific and limited a question is, the more likely it will receive quality answers and be helpful to others. I could be missing something, but I believe you have left a little too much to the person answering your post. I therefore don't think this question is a good fit for this site as written. You may wish to edit it to limit the scope, or spend a bit more time solutioning here. Good luck! – Adrian Larson Apr 2 '19 at 22:39

Your Answer

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

Browse other questions tagged or ask your own question.