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

I have the same question (0)
  • MuthukumaranAX Profile Picture
    2,903 on at

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

    thanks,

  • Verified answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    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

  • Suggested answer
    Forever Profile Picture
    110 on at

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

  • Forever Profile Picture
    110 on at

    have you any link of code, please share it.

  • Suggested answer
    Forever Profile Picture
    110 on at

    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

    have you any solution? i have sent you code.

  • Forever Profile Picture
    110 on at

    how to call ax class from email hyperlink?

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans