Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Approve Sales Order from Email hyperlink

(0) ShareShare
ReportReport
Posted on by 110

Dear Team,

I have created approval field in salestable and i want to uptik when email hyperlink clicked. I have to edit salestable by email hyperlink click on "approve"

i want to create hyperlink in emial and once click on hyperlilnk then approval check bok uptick. how to call aif services with email hyperlink kindly suggest.

Please suggest how to do this.

  • Forever Profile Picture
    110 on at
    RE: Approve Sales Order from Email hyperlink

    how to call ax class from email hyperlink?

  • Forever Profile Picture
    110 on at
    RE: Approve Sales Order from Email hyperlink

    have you any solution? i have sent you code.

  • Suggested answer
    Forever Profile Picture
    110 on at
    RE: Approve Sales Order from Email hyperlink

    ax 2012 r3 and email is write by x++ code.

    if (parameters.SMTPRelayServerName)

       {

           relayServer = parameters.SMTPRelayServerName;

       }

       else

       {

           relayServer = parameters.SMTPServerIPAddress;

       }

       portNumber  = parameters.SMTPPortNumber;

       userName    = parameters.SMTPUserName;

       password    = SysEmailParameters::password();

       subject     = Strfmt("Subject");

       body        = strfmt("Body");

       try

       {

           mailMessage = new System.Net.Mail.MailMessage(username,toEmail);

           if(ccEmail)

           {

               mailCCCollection = mailMessage.get_CC();

               mailCCCollection.Add(ccEmail);

           }

           mailMessage.set_Subject(subject);

           mailMessage.set_IsBodyHtml(true);

           mailMessage.set_Body(body);

           smtp                    = new System.Net.Mail.SmtpClient();

           smtp.set_Host(relayServer);

           smtp.set_Port(portNumber);

           smtp.set_EnableSsl(true);

           nc                      = new System.Net.NetworkCredential(userName, password);

           smtp.set_DeliveryMethod(System.Net.Mail.SmtpDeliveryMethod::Network);

           smtp.set_UseDefaultCredentials(false);

           smtp.set_Credentials(nc);

           smtp.set_Timeout(600000);

           smtp.Send(mailMessage);

           CodeAccessPermission::revertAssert();

           info("Email has been sent!");

       }

       catch (Exception::CLRError)

       {

           info ("Failed to Send Email some Error occured");

       }

       if(!toEmail)

       {

           info('Please set to Email !');

       }

  • Forever Profile Picture
    110 on at
    RE: Approve Sales Order from Email hyperlink

    have you any link of code, please share it.

  • Suggested answer
    Forever Profile Picture
    110 on at
    RE: Approve Sales Order from Email hyperlink

    yes exactly but how to pass the link from email thats i doesnt know.

  • Verified answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Approve Sales Order from Email hyperlink

    Hello Forever,

    Will you also display sales order data in the email and allow users to approve via an email button or do you want to create a link back into AX?

    For the latter one, have a look at the vendor invoice workflow, which has such a functionality available for POs. Based on that you can do something similar for SOs.

    Best regards,

    Ludwig

  • MuthukumaranAX Profile Picture
    2,901 on at
    RE: Approve Sales Order from Email hyperlink

    Hi - what is ax version and how email is being setup?

    thanks,

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,886 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,766 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans