Options

Send Purchase order page link to the Manager

kmkaotkmkaot Member Posts: 261
I want send Purchase order link to my Manager for review and approve in Nav 2015 or 2016.

User is CEO, so I want automatic login when he/she open link in the email.

any suggestion please

Warm Regards
Kris

Answers

  • Options
    zohaibu95@hotmail.comzohaibu95@hotmail.com Member Posts: 223
    edited 2017-01-22
    You can implement Document Approval functionality in Dynamics NAV.

    You can read more about here:
    https://msdn.microsoft.com/en-us/library/dd338778(v=nav.90).aspx
    Best Regards
    Zohaib Ahmed
    Dynamics NAV ERP Technical Consultant.

    please like / agree / verify my answer, if it was helpful for you. thanks.
  • Options
    zaidtariqzaidtariq Member Posts: 52
    Use Nav document approval process and configure SMTP mail for notifications.
    Best Regards:
    Zaid Tariq
    Dynamics NAV/365 BC Developer at Dynamics 360

    please like / agree / verify my answer, if was helpful.
  • Options
    kmkaotkmkaot Member Posts: 261
    SMTP takes minimum 1 day to notify the approval record. Here user wants immediate notification.
  • Options
    zohaibu95@hotmail.comzohaibu95@hotmail.com Member Posts: 223
    edited 2017-01-23
    You don't need to use SMTP. Just setup Document Approval in NAV it will do which you want to implement :)
    and if you don't want to do that, then you can customize it.
    The algorithm will be like that.

    1. When the purchase order has been created (inserted) on that even you get the newly created purchase order and send a notification email via SMTP.
    2. If you want to include direct link you have to see how WebClient of Dynamics NAV and you need to form appropriate URL and embed it in the email body.

    For the URL generation you can see this link: https://blogs.msdn.microsoft.com/nav/2013/11/04/creating-urls-to-microsoft-dynamics-nav-clients/

    5. If your CEO user is configured in Dynamics NAV, when he will click on that link he will be able to see that purchase order and he can approve it.

    But i will stay say, implement the Document Approval in Dynamics NAV. Its more efficient and designed for this task.
    Best Regards
    Zohaib Ahmed
    Dynamics NAV ERP Technical Consultant.

    please like / agree / verify my answer, if it was helpful for you. thanks.
  • Options
    KishormKishorm Member Posts: 921
    edited 2017-01-23
    kmkaot wrote: »
    SMTP takes minimum 1 day to notify the approval record. Here user wants immediate notification.

    SMTP in general will send emails immediately. Approval notifications uses Notification Templates and Notification Schedule to format, schedule and send emails (via SMTP). You need to make sure that the "Recurrence" field is set to "Instantly" on the Notification Schedule. Have a look at this for more info...

    https://msdn.microsoft.com/en-us/library/dn951588(v=nav.90).aspx

    Also make sure that the Job Queue used to process the Notification Queue is set to run on a regular basis (every 5 minutes or whatever you need)
  • Options
    kmkaotkmkaot Member Posts: 261
    Thanks Kishorm

    Since SMTP was not working from my server, I am using email code unit to send emails.

    Warm regards
    Kris
  • Options
    zohaibu95@hotmail.comzohaibu95@hotmail.com Member Posts: 223
    @kmkaot you need to tick on Secure connection.
    Best Regards
    Zohaib Ahmed
    Dynamics NAV ERP Technical Consultant.

    please like / agree / verify my answer, if it was helpful for you. thanks.
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    Make sure that you are using gmail as SMTP server?
  • Options
    kmkaotkmkaot Member Posts: 261
    yes smtp.gmail.com
  • Options
    zohaibu95@hotmail.comzohaibu95@hotmail.com Member Posts: 223
    edited 2017-01-23
    @kmkaot you have wrote a wrong SMTP server port. Google does not use port 25. Its port 587.

    You can see my configuration i m able to get the email.

    a3k3355rzf1i.png


    Also you might need to turn on the "Access for less secure apps"

    Hope this helps.
    Best Regards
    Zohaib Ahmed
    Dynamics NAV ERP Technical Consultant.

    please like / agree / verify my answer, if it was helpful for you. thanks.
  • Options
    KishormKishorm Member Posts: 921
    kmkaot wrote: »
    Thanks Kishorm

    Since SMTP was not working from my server, I am using email code unit to send emails.

    Warm regards
    Kris

    SMTP was probably not working on the server because the SMTP server setup was incorrect (e.g. "Secure Connection" / Port etc... as mentioned by others). Once you have the SMTP working it would probably be better to use standard Approvals (assuming your requirements haven't changed) otherwise you're really reinventing the wheel. If you are going to do your own approvals then things you may want to consider are...

    1) Making sure the email is only sent once the Order has been fully entered (i.e. user has entered all header & line details)
    2) Implementing methods to allow the approver (manager/CEO) to actually approve / decline the order
    3) Blocking changes to the order once the approvel request/email has been sent.
    4) Making sure the document cannot be posted without it being approved first
    5) Having a log/audit of who approved the document and when
    etc...

    For the above reasons and more, I'd suggest you go back to standard approvals once you have your SMTP setup working.
  • Options
    kmkaotkmkaot Member Posts: 261
    Thank you all,
    There was wrong entry in email id and password.
    SMTP is working fine
    Thanks and warm Regards
    Kris
Sign In or Register to comment.