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.


Report
All responses (
Answers (