Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

Invoke Page Action via web services

Posted on by Microsoft Employee

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?

Categories:
  • Suggested answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: Invoke Page Action via web services

    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 

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Invoke Page Action via web services

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

  • Suggested answer
    I Gusti Made Ari Profile Picture
    I Gusti Made Ari 3,592 on at
    RE: Invoke Page Action via web services

    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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Invoke Page Action via web services

    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
    I Gusti Made Ari 3,592 on at
    RE: Invoke Page Action via web services

    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

  • Suggested answer
    Muratvzr Profile Picture
    Muratvzr 743 on at
    RE: Invoke Page Action via web services

    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

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans