0

We are sending an email using an email template to an internal user that will have a link to an internal Knowledge article in it.

Currently I have the URL hard-coded like so: https://na29.salesforce.com/articles/How_To_Docs/How-to-Do-This

What merge field can I use in an email template to get the Instance needed to generate a URL to an internal knowledge article?

We have an upcoming Instance Refresh so na29 will no longer be valid.

Is there a merge field I can use in place of the na29 or even in place of the na29.salesforce.com so I can recreate the URL that is needed to the Knowledge article?

*edit: I am using an email template type of Custom not Visualforce.

We are not setting up My Domain yet.

0

There's an ancient "API version substring" hack described for example on https://developer.salesforce.com/forums/?id=906F000000096wuIAA, experiment with it a bit? If it won't work in the email template itself - you could always add the formula as a field on the article itself?

I don't have Knowledge Base handy at the moment but I'd imagine the email editor would include a proper link merge field like {!Contact.Link}?

  • I am not using a visualforce email template type. – Jason Oct 4 '17 at 22:28
  • I don't think this merge field is available in plaintext/html emails. Still - try making a formula with it on your Article, Case or whatever is the email's "master record" and then use that merge field? – eyescream Oct 4 '17 at 22:35
  • This is being done in the Community welcome email. The link that is only sent to internal users is to a Knowledge article. I don't think a merge field would be available in this template unless I added this formula field to user which I would rather not do. – Jason Oct 4 '17 at 22:45
0

To solve this we created a new Custom Setting called Global Settings with a custom field named SfdcInstanceId and then we reference the field in various locations using {!$Setup.Global_Settings__c.SfdcInstanceId__c}

Once our instance refreshes we just need to update the value in this custom field.

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.