Including URLs in Email Templates
You can include URLs in email templates that link to pages in the NetSuite application. For example, you may include a link to a specific issue or case record in communication you send to a customer. In email, these are sometimes referred to as deep links. The ability to access a record from a deep link depends on the role and permissions of the recipient.
In most cases, an email template should include a FreeMarker tag for a record’s URL. This tag is most useful for system email templates. These templates are only used in situations where the intended record (and its URL) can be determined.
The deep link must contain the NetSuite account ID to work properly for the recipient of the email. You have several options for including URLs in email templates.
-
You should include the FreeMarker tag for a record’s URL. You could use the
${record.url}
or${appDomain}
tag. The${appDomain}
tag returns your account-specific domain in the URL. As a generic example:https://${appDomain}/path/to/my/page.nl
. See Sample Scriptable Templates and the Apache FreeMarker Manual at https://freemarker.apache.org/docs/index.html. -
If you cannot use a FreeMarker tag for a NetSuite page, use your account-specific domain URL. Go to the record in your account, and copy the page’s URL from your browser. Paste the URL into the email template. For more information, see URLs for Account-Specific Domains.
If you do not include a FreeMarker tag or use your account-specific domain, when you save the email template you receive the following error:
Links to NetSuite record pages must include your account ID for them to work correctly.
The error message contains instructions for correcting the problem. You must edit the URL for the deep link to include your account ID using FreeMarker tags or using your account-specific domain.
Adding a link to the File Cabinet
You can also use URLs in email templates to create a link for a document contained in the File Cabinet. For more information, see: Creating a New Email Template:
If you want to restrict file access to internal company use only, leave the Available Without Login box unchecked.