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
ATHUL MATHEW 18ATHUL MATHEW 18 

custom object mergefield in a MetaDataRecord

We have various SMS Templates as a CustomMetaData and need to add mergeField on these Metadata records. This MergeField is the fieldData on the custom lead object to which the SMS should be sent. Is this possible to add MergeFields on a MetaData Text field.
Best Answer chosen by ATHUL MATHEW 18
GulshanRajGulshanRaj
Hi Athul,

I don't think so you can do that. Merge fields are treated and recognized in special way. By creating a text field and storing the merge fields still treated as a text field.


Best Regards
Gulshan Raj

All Answers

VinayVinay (Salesforce Developers) 
Hi Athul,

Can you elloborate more on this and add screenshot?

Thanks,
GulshanRajGulshanRaj
Hi Athul,

I don't think so you can do that. Merge fields are treated and recognized in special way. By creating a text field and storing the merge fields still treated as a text field.


Best Regards
Gulshan Raj
This was selected as the best answer
ATHUL MATHEW 18ATHUL MATHEW 18
Hi Vinay sir...we have 3 associate companies in the org, users are differentiated based on the profile which is the name of the company. There are 10 SMS templates and we have created 30 metadata records-10 for each company. Now we need to add more templates. The records are only differentiated with company full name, contact numbers of the concerned department etc. So can we create merge fields here so that 1 record works for 3 companies.
I could solve this by adding new fields in Lead object like Company full name, Company contact number. But thats not a practical solution. 

Kindly help, Thanks in advance.