0

Do you know other way to make this Subject of Email Template dynamic instead of using String.replace() method?

My current procedure is like this:

Classic Email Template:

Subject -> New Request to Activate Account in JDE - CRM ID: Field1 - Field2

Code:

accNameReplace = accNameReplace.replace('Field1', String.valueof(accToEmail.Field1));
accNameReplace = accNameReplace.replace('Field2', String.valueof(accToEmail.Field2));

But I'd like to use curly brackets way like this:

New Request to Activate Account in JDE - CRM ID: {!Account.Id} - Area: {!Account.SalesAreaERPID__c} - Zone: {!Account.AccountSalesZoneErpid__c}

How can I use logic and code to manage this measure?

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.