You need to sign in to do that
Don't have an account?
pavan kumar 177
How to hyper link dynamic Link in apex with text or clickable button
am sending sample survey email to users whenever accounts meets particular criteria.
I created a apex class and iam accessing contacts and sending contact details to below SendEmail method.Now i am attaching a link within email template through HTML body but i dont want to send long link to the user.
Is there any way to hyperlink above link to small text or clickable image.
Like Below:
I created a apex class and iam accessing contacts and sending contact details to below SendEmail method.Now i am attaching a link within email template through HTML body but i dont want to send long link to the user.
Is there any way to hyperlink above link to small text or clickable image.
Like Below:
public Static void sendMail(Id accountdetails,String Emaildetails,Id Contactdetails,Id CaseId,String Customername,String Accountsname) { Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); List<String> sendTo = new List<String>(); sendTo.add(Emaildetails); mail.setToAddresses(sendTo); mail.setReplyTo('pavank@azuga.com'); mail.setSenderDisplayName('Azuga Telematics'); mail.setsubject('Invitation to participate in survey'); String body = 'Hi '+Customername+','+'<br/>'+'<br/>'; body += 'Account Name:'+'<br/>'+'<br/>'; body += Label.Churn_Site_Details+'&cId='+Contactdetails+'&caId='+CaseId; mail.setHtmlBody(body); Messaging.SendEmailResult[] results = Messaging.sendEmail( new Messaging.SingleEmailMessage[] { mail }); inspectResults(results,accountdetails); }
May I suggest you please give a try by replacing the link text with an image:
Thanks,
Nagendra
But im getting an error like Expression cannot be assigned