Making PO in Navision Using Sql

Prajeesh_NairPrajeesh_Nair Member Posts: 70
Hiiii all :)
I want some information which would be helpfull. I want to create PO(purchase order) from an external application.
This can be done through C/Front and dataport right?. But in my case it can't be done through dataport , because i want it to be done automatically
ie, the external application should make a PO directly .
Can this be done through SQL. Can SQL make direct record entry to tables like purchase header ,purchase line and do PO in navision.Can it directl make PO in navision ](*,) . Please help me . Expecting your valuble information. [-o<

Comments

  • garakgarak Member Posts: 3,263
    edited 2009-01-25
    Don't do this on the direcly way:

    if you store the datas directly into the Nav tables, you must also rebuild all the C/AL business logic like the validations or the check for table relations (for example exist the vendor oris he blocked, exist the item or is it blocked .... and so on) because the C/AL isn't fired when you store the datas from 3-rd app, and this is to complex (for example you change the C/AL code you must also change your sql code), so don't do this [-X

    So you can insert your data in a preprocess table (for example with bulk insert if you have your datas in a extfile or in a other table in a other system also with using a webservice if needed) and process the datas in this table with NAS (or instead of preprocessing table u send a XML stream via messagequeue to the NAS).
    The NAS creates, based on the datas in your preprocess table (or xmlstream), your PO and set a flag in the preprocess table if the creating was successfully or not (like vendor doesn't exist). So you have no inconsistent datas.

    Search the forum for NAS and create Orders (or so).

    Instead of NAS you can also use a Client that process the datas.
    In both cases you can also use for this the Job Sheduler.
    Search also for this the forum or read the manuels for job sheduler.

    Regards
    Do you make it right, it works too!
  • nunomaianunomaia Member Posts: 1,153
    You can create PO in SQL since Navision logic won’t run. In this forum there several posts about this subject. You can for example expose webservices from NAV side and external application create PO.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • Prajeesh_NairPrajeesh_Nair Member Posts: 70
    Thanx a lot i will go through NAS. Hope for success :-k
Sign In or Register to comment.