web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Add a location field in Sales Order Entity (NAV 2018 API)

(0) ShareShare
ReportReport
Posted on by

Hi Expert,

currently we are looking to integrate an e-commerce platform with Dynamics NAV 2018 via API and now we found an issue.

In my case, there are a requirement that Location Code in Sales order (NAV) can be defined by end consument from E-commerce website.

somehow, in default API for sales order (TAB 5495 - Sales Order Entity Buffer) dont have field Location Code.

I already tried to explore and add manually Location Code field, but somehow when we test it using POSTMAN, the GET function can retrieve the Location Code Value from sales header, but when we try the POST function, the value are not copied to NAV.

is there anyway to find a workaround/solution for this case?

*This post is locked for comments

  • Suggested answer
    Andrey Baludin Profile Picture
    3,943 on at

    Hi!
    NAV takes location code for Sales orders from Customer card. So you can pass different customer numbers which has different location values on NAV side.

  • Community Member Profile Picture
    on at

    Hi Andrey,

    in my case, there are a flexibility for end consumer to choose if they want to pick their own order to offline store. thats why we can't set the location code in customer card because there is a possibility that in the next order, the location can be different from the first order.

    have you done something similar? modify the existing API buffer entity table?

  • Suggested answer
    Andrey Baludin Profile Picture
    3,943 on at

    As I see - Sales Order Entity page based not on Sales Header table:

    sales-entity.JPG

    And on Graph Management it transfers fields to Sales Header.

    Problem is that Sales Order Entity Buffer doesn't contain Location code field.

    So If I were you - i'll try to add to Sales Order Entity Buffer table Location code field with the same number (28) as in the Sales header table. And after that add it to Sales Order Entity page (5495). It should works. (You can easily do it even with extensions).

    Yes, i've made some jobs with NAV2018 API's:

    https://community.dynamics.com/nav/b/andreysnavblog/archive/2018/03/19/how-to-get-picture-from-mediaset-through-standard-apis

    community.dynamics.com/.../how-to-obtain-data-from-nav-standard-apis

  • Community Member Profile Picture
    on at

    Hi Andrey,

    already tried in our local server before. 

    GET-POSTMAN2.png

    PAGE5495.PNG

    it working well when i try to get data using postman

    GET-POSTMAN.png

    however it doesnt work when i try to POST via postman

    GET-POSTMAN2.png

    is there something i miss?

  • Verified answer
    Andrey Baludin Profile Picture
    3,943 on at

    Looks like Location from Customer rewrite your Location code. Try to clear location code in customer card and post again.

  • Community Member Profile Picture
    on at

    its working.

    Thanks for the idea.

  • Ghetz Profile Picture
    3,029 on at

    @StevenL ,I'm working on a similar project. May I ask, how you are planning to call the web services after you finish testing with postman? Any .NET library, JS? have you been able to practically work with this OData services?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans