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, ...
Suggested Answer

How to send email with d365fo URL using x++ code

(0) ShareShare
ReportReport
Posted on by 97
Hi All,

I have written code to send email for PO Confirmation. It's working fine.
Now the requirement is to send mail with URL. Upon clicking the Link, it should take to the related PO page.
Using placeholders we are setting the body.

 
Front end setup:
 

I don't know how to set Web link in the email body.
Can anyone help me how to acheive this using x++?
 
Thanks in advance.
 
I have the same question (0)
  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at
    I'm assuming that builder is an instance of SysMailerMessageBuilder class. If so, the second parameter of setBody() says whether it's HTML code. It's true by default, so you don't need to change it. In HTML, you can use "a" element with "href" attribute to define a link.
     
    To create the URL, you can utilize UrlGenerator class.
  • Suggested answer
    Komi Siabi Profile Picture
    13,107 Most Valuable Professional on at

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 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans