0

I've written an Apex class that returns a string. How can I call it in an HTML email template in Salesforce?

<h1>${!CommaSeparation.separate(Lead.Credit__c, 0)}</h1>

The function works fine, it returns blank in the email template though. Any help?

  • I think you need to use visualforce email template – Ratan Paul Nov 25 '15 at 6:05
  • Yeah, I am. It all works fine, just the result of my function (above) returns blank in that template. – okay56k Nov 25 '15 at 6:06
  • 1
    you need to call the CommaSeparation.separate(Lead.Credit__c, 0) this in apex class and store into a variable and then display in component – Ratan Paul Nov 25 '15 at 6:09
1

you need to call the CommaSeparation.separate(Lead.Credit__c, 0) this in apex class and store into a variable and then display in component

| 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.