Search This Blog

Saturday, 15 February 2014

Mail Client Approval System in NAV (Navision)

Recently, one of my clients had a rather unique requirement. The senior management, almost all of whom are a part of a single business family and travel frequently wanted a facility whereby they could approve purchase orders and other such critical documents online.

There are various ways you can do this off course using web services and the simplest one is by making a web page, with approve or reject buttons. And I was pretty much sorted until the client told me that the web page mechanism wouldn't work as they were skeptical of the use of such data over a web page and felt that their data could be at risk from hackers, eavesdroppers and the likes.

So, the next best solution that came to my mind was to build an application however, such applications are not only costly to build but would also require to be enabled for different OS.

So, I thought to myself, why not use an e-mail body for approvals!

It turns out that this is pretty simple. You or the programmer needs to have knowledge about NAV web services and IIS.

In short, what goes into this is the following:


  • Create a Codeunit Web service for approvals
  • Create a mid-layer IIS web service (This web service is used for communicating between 2 other web services)
  • Create a REST web service
  • Expose the REST web service on the IIS
  • While writing the body content of an e-mail create 2 hyperlinks with the hyperlink as the REST web service with parameters (one link for Approve and the other for Reject)

That's it!!!!

That's all that you need to do.

Pretty simple.

For further information and code you can write to me at vrushankmehta@gmail.com

No comments:

Post a Comment