Workflow email URL encoding as a link

When setting up an email template there are times where you might want to send out an email that includes the link to the enterprise portal. If you have left the default name for the portal then you will see there is a space between enterprise and portal which when the email gets created might not come through the systems where the user can click on the link.

You see in this example I’ve got two links one which is in black text and the other you can see marked in blue and underlined as a standard hyperlink.



This can be controlled by the setup in the email template. In this example the email template looks like this with the replacement code %url% that is relevant for this template entered. You can see that the first one doesn’t look like a hyperlink where the second does. This is because the second one is entered as a html tag.


If you click the html tab at the bottom of the email editor to go into html mode. The second link is tagged with href tag and the relevant replacement code %url% inserted into the appropriate places in the tag.



Sometimes the url that is generated in this example the user authentication for the claims based email is quite long, complex and maybe scary looking for what you need the user to do. With the href tag you can then insert the appropriate text to show on the link and hide the actual url. For example



This would look like this in the html.



And the output would look like this when sending.



Here is a quick video walk through of the process.




One response to “Workflow email URL encoding as a link

  1. It might help those, who are looking to generate the enterprise portal document link to open a specific document outside of AX. You can you write a simple method and use the following code:
    static str getPOURL(PurchId _purchId)
    Common rec = PurchTable::find(‘PO-000974’);
    WorkflowEPUrlContext urlContext;
    WebLink webLink;
    str urlMenuItemName = webUrlItemStr(EPPurchTableInfo);
    urlContext = WorkflowEPUrlContext::contruct();

    webLink = WebLink::construct(false, urlContext);
    if (urlContext.getInternalSiteURL())
    webLink.menufunction(WebMenuFunction::createWebMenuFunction(urlMenuItemName, WebMenuItemType::Url));



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s