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 :
Microsoft Dynamics AX (Archived)

Adding line breaks to email notification via Work Item Instructions

(0) ShareShare
ReportReport
Posted on by

Hi all,

I have problem with setting up text formatting on an email notification through the workflow function.

(Procurement and sourcing / Setup / Procurement and sourcing workflow - Basic Settings / Work Item instructions)

When I enter the text in the "Work Item Instructions" box, I press 'return' key to insert new sentence on a new line. However, when I look at the email notification, the sentences continue on from each other.

How can I put sentences on each line (and with blank lines in between)?

Is there some type of placeholder that can be entered that represents new lines?

I not a developer, so no code solution please. Rather a solution a user of Dynamics can apply.

Thanks

I have included screen shots of what I am referring to.

Screen-shot-for-question-for-Dynamics-Community.png

*This post is locked for comments

I have the same question (0)
  • Chandra Wijaya Setiawan Profile Picture
    1,145 on at

    Hmm I never try this but I don't remember having same issue like yours

    Try following  idea

    Add <br> as enter character for HTML

    Add \n as enter character in string for x++

    Use shift enter

    Use Ctrl enter

  • Community Member Profile Picture
    on at

    Thanks for your help but nothing worked.

    Using <br> or \n (or even \r) didn't work - these ended up as text on the email.

    Shift-Enter or Ctrl-Enter didn't change anything - still on one line.

  • Suggested answer
    fatihgork Profile Picture
    3,817 on at

    Hi,

    I guess notification message will need some development but, you should try to work with your e-mail template of workflow for the e-mail message. There are two tabs in designer, the second one holds the style behind it. What Chandra suggested should work in there

  • Chandra Wijaya Setiawan Profile Picture
    1,145 on at

    Fatih remind me of something perhaps you can screenshot you email body from email setup

  • Suggested answer
    fatihgork Profile Picture
    3,817 on at

    Hi,

    This is the form we point:

    workflow-template-2.png

    This two lined text is coded into HTML as following, by default behavior:

    workflow-template-2.png

    You can change <P> codes to <BR> instead just like Chandra mentioned and the result is:

    workflow-template-3.png

  • Chandra Wijaya Setiawan Profile Picture
    1,145 on at

    Thanks Fatih,

    Sorry i didnt put my question very clear. 

    My question was to GST stuff.

    I need the screenshot of his email template body.

    For comparison this is my usual setup for workflow sample, and it can detect the enter character from workflow

    3201.workflow.jpg


    3201.workflow.jpg

    and below is the html view:

    <P><STRONG>Dear User,</STRONG></P>
    <P>This is a notification for&nbsp; <A href="Dynamics://%LinkToBusinessData%">%for%</A>. Please click the link to open the record in AX 2012.</P>
    <P>%message%</P>
    <P><BR>Regards,</P>
    <P>AX administrator</P>
    <P>This is system generated email. Please don't reply to above email address.<BR>For any AX inquiry please contact IT Department</P>

    And below would be the result of %message% from workflow setup.

    0451.workflow2.jpg

  • Community Member Profile Picture
    on at

    Hi Chandra & Fatih,

    Thanks for your input.

    Here is a screen shot of the email template and the code behind it.

    The purpose of this question is for email to have approval links (accept / reject) within its contents so people can approve away from their work computer.

    So the "first sentence" and "second sentence" in my original question are really "accept" and "reject" links and are encapsulated in the %message% code.

    These are the text that I want to force onto separate lines but the way %message% seems to work will not allow it.

    I do appreciate it may be a bit more difficult than first explained.

    Email-Template-Cover.jpg

    Email-Template-Code.jpg

    At the moment I have to manually set the spacing in the workflow for the contents of the %message% since the programme seems to remove any excess spaces.

    The format I have below provides sufficient spacing so it will fit across the screen of any iphone as well as any android devices.

    If it wraps onto the next line (without line spaces) the links are too close together and the user could miss-press the other link.

    This now comes back to my original question - the need to add lines in the %message% (Work Item instructions) so I can separate the links.

    Workflow-Settings.jpg

    Since my original post I have been able to highlight the "Reject" link as red to further distinguish it from the "Accept" link.

    The email the user receives looks like below.

    This is not a simple screen shot, I have edited the photo to remove some of the spaces between the lines so it doesn't take up so much space on this forum.

    Email-Notification.jpg

  • leddy365 Profile Picture
    110 on at

    Hi Gst Stuffed,

    I know this question is a few months old, but I've come across it whilst trying to work on Purchase Order and Purchase Invoice workflows and email templates.

    I see in your email template above that you have the PO line details in the template itself - how have you managed that? Are they custom placeholders? If you could give me a pointer on how to achieve that, I would be most grateful.

    Many thanks

    leddy

  • Community Member Profile Picture
    on at

    G'day Ieddy,

    Unfortunately these are custom placeholders which a programmer put in.

    From memory, he had trouble finding the right table columns to populate.

    Sorry I can't be of more help.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans