PO Creation from .Net

Hi

I am a .Net developer supporting a custom desktop application written in .Net. The new requirement is to create a PO in NAVision on clicking a button in the .Net application.

All the required data (PO Amount, Account code etc.) is available in the .Net application. I can also foresee the customer asking further changes to the PO state like Approval/Cancellation etc. through the same mechanism.

My questions are:

Is this even possible?
Do I write some code in NAVision and call it from .Net?
What is the standard way of doing these things?

My searches on Internet so far have shown me how to call .Net objects from inside NAVision but not the opposite.

Any links/pointers etc. are welcome.

Regards

Shreekar

have you looked at web services?

http://msdn.microsoft.com/en-us/library/aa546327.aspx

Web services support communication across platforms and programming languages.

Solutions that need to execute business logic or read data from Microsoft Dynamics NAV are candidates for Web service implementation. These can also be solutions that write data to Microsoft Dynamics NAV and validate the data using existing business logic.

Consider using Microsoft Dynamics NAV Web services to:

  • Validate or enter customer information.

  • Enter sales orders.

  • Query items on stock (delivery dates, discounts, prices, and so on).

  • Create purchase orders.

  • Initiate various Microsoft Dynamics NAV operations.

  • Execute any kind of business logic that is more easily developed and managed in Microsoft Dynamics NAV.

Sorry, should have said that version of NAV is 5.0. Are these features also available in 5.0?

You can use web services. ask your navision developer to give the web servics url of the relevent

pages[Purch,Sales]. Those pages have the methods like Update,Delete,Create,Update Multiple,Create Multiple .You can use those methods to create Po,So from outside Navision.

Thanks

Jerome Marshal.J

And important is Pages are available in nAV 6.0 only. Lower versions don’t have pages

so let us know what version of navision you are using.

Thanks

Jerome Marshal.J

5.0 its not possible to use web services. Even ther is an possibility to use NODBC but it will directly contact the Navision table and create the records.

But

Thanks

Jerome Marshal.

Thanks Jerome.

In that case, is something like below advisable:

  1. The .Net application makes an entry directly into the PO table. Besides the mandatory fields, an additional field is updated to record the source of the PO.
  2. The trigger or similar mechanism in NAV on the PO table detects the addition, reads the source field and updates other relevant tables/executes code to create a valid PO.