web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Email Template Lines Placeholder

(0) ShareShare
ReportReport
Posted on by 260

Hello everyone,

Sometime ago I created a custom email template, and I set the placeholders using a Map in X .
Everything is working fine except for the item lines. 
The shipment level information I just map it normally and it works

mappings.insert('deliveryzipcode', lpa.ZipCode);
mappings.insert('deliverystate', lpa.State);
mappings.insert('deliverycity', lpa.City);


For the line mappings I didn't find a good way so I'm doing a while select and adding the items <BR> to jump a line on the email template.

while select whsLoadLine
where whsLoadLine.LoadId == _loadId
join salesLine
where salesLine.InventTransId == whsLoadLine.InventTransId
{
  itemId  = inventTable.ItemId   "
"; qty = whsLoadLine.qty "
"; } mappings.insert('lineitemid', itemId); mappings.insert('linequantity', qty);

I'm using the html below as an example.

Item Number Quantity
%lineitemid% %linequantity%

However, when I have a lot of items the <BR> will break the structure because the ideal would be using a
<tr><td>itemId</td><td>qty</td></tr> for each row, but if I do like this the email template would always have ItemId | Qty and I want it to be the most dynamic possible where the user can modify the template themselfes and add only what they need. (I have many other linemappings).

Does Microsoft provide a better way of doing the line part? I didn't find anything on be researchs.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 687 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 535 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 403 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans