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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Email Template with Dynamic Table

(0) ShareShare
ReportReport
Posted on by 563

Dear Experts,

I'm developer of Microsoft Dynamic AX 2012 R3

I want to create email template with dynamic table

This is my email template

Email-Template.png

And I want to set this to email body

Email-Template-Want.png

I just try HTML tag to mapping String, but It not rendered to HTML. This is my code

mappings = new Map(Types::String,Types::String);

tableDue    = "<table><th><td>#</td><td>Invoice</td><td>Description</td><td>Amount</td><td>Due Date</td></th>";
            
mappings.insert("TableDue",tableDue);


Do you have any suggestion?

Thanks in advance

Best Regards,

Bintang

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    Hi Bintang,

    There is standard code that sends sales order details in a table format, so table is dynamically generated based on number of lines in SO. Check  RetailOENInfo.generateSaleslineTable method and follow same logic in your code. 

  • syed baber Profile Picture
    11,633 on at

    Hi Ievgen,

    I have the same requirement and looked at the method that you mentioned, but it is not creating any table control at runtime by modifying the email template. Do you know of any example which creates multiple line in the table using HTML <table> tag based on the number of records. I need to show the records in the table.

    Thanks,

    Baber.

  • Community Member Profile Picture
    on at

    Hi Bintang,

    I have a similar requirement to create email template with dynamic table. Please let me know if you have managed to achieve this.

    Regards,

    BMandal

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans