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

Notifications

Announcements

No record found.

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,600 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,600 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
    8,637 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans