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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Invoke Page Action via web services

(0) ShareShare
ReportReport
Posted on by

I am trying to invoke a "default" action via the Sales Order. I am trying to create a warehouse shipment from the Sales order. The action I am trying to invoke is <Action149> Id#149.

This is the URL I am trying to post:

{{ base_url  }}/nav_SalesOrders('S001293'/149

Does the syntax look correct?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Muratvzr Profile Picture
    743 on at

    I think you should create separate code unit and add method on this and make this method Global. And add this method to web service And call this method via Web service

  • Suggested answer
    I Gusti Made Ari Profile Picture
    3,608 on at

    In NAV 2018 , you can use Boundaction, refer on below :

    https://docs.microsoft.com/en-us/dynamics-nav/walkthrough-creating-and-interacting-odata-v4-bound-action

    Syntax should be like :

    http://<Server>:<WebServicePort>/ODataV4/Company('CRONUS%20International%20Ltd.')/SalesOrders(<Document Type>,<No.>)/NAV.Post

    for Post function inside the Sales order page , please ensure the property as below :

    PropertyValue
    Local No
    FunctionVisibility External
    ServiceEnabled

    Yes

  • Community Member Profile Picture
    on at

    Thanks for this information. After my sales order posts, I am trying to call on the specific <action149> which "creates a warehouse shipment" from the Sales order that was just created. Can this be accomplished via a POST command?

  • Suggested answer
    I Gusti Made Ari Profile Picture
    3,608 on at

    Yes, it is possible . you need to create the function to create the warehouse shipment inside the page . please ensure there is no client call back (MESSAGE,ERROR prompt) and set the function properties as below :

    Property Value

    Local No

    FunctionVisibility External

    ServiceEnabled Yes

  • Suggested answer
    RockwithNav Profile Picture
    9,191 Super User 2026 Season 1 on at

    Yes going with the Codeunit and then calling that code part will be a better Idea instead applying your Brain on this!!

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    I would create a new function in a codeunit and then expose the codeunit as a web service. Once the codeunit is exposed as a web service you can call the functions with a POST.

    Link: http://www.tharangac.com/2019/02/call-business-central-function-through.html 

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May 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