Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Consume a specific procedure from a codeunit published as a web service

(0) ShareShare
ReportReport
Posted on by 117

Good morning community, first of all, thank you very much for taking the time to read my question.

I explain what I have tried to do, I have built the following code unit and I have published it as a web service in Business central

pastedimage1646256571489v1.png

pastedimage1646256614669v2.png

In the SOAP url it takes me to the following screen

pastedimage1646256709312v3.png

What I'm trying to do in Postman is to consume that code unit and its procedure called "FindItem" which only expects an item code and the procedure tells me if that product exists or not


But I can't create the query in Postman to receive the response of that specific procedure

What I currently have in Postman is the following

pastedimage1646256958960v4.png

It would really help me a lot if you shared a way to consume that procedure in Postman

Again thank you very much for your time and knowledge.

Good day

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Consume a specific procedure from a codeunit published as a web service

    Recommended (and more future proof) way is to use OData bound actions:

    demiliani.com/.../

  • Suggested answer
    JAngle Profile Picture
    83 on at
    RE: Consume a specific procedure from a codeunit published as a web service

    I think it needs to be a POST request. I did a blog on something similar: joshanglesea.wordpress.com/.../

  • Yael Suarez Profile Picture
    117 on at
    RE: Consume a specific procedure from a codeunit published as a web service

    Thanks for your time

    Look try to do it this way by modifying the url and in the Body put the following but when sending as a response I get a blank line

    In this case, it should return a True since that Item Code that I place if it exists in the database

    pastedimage1646259406939v1.png


    Thank you again for taking the time to reply.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,476 Moderator on at
    RE: Consume a specific procedure from a codeunit published as a web service

    If you want to call a specific procedure in the codeunit, you need to call the procedure in the URL.

    DataYss_FindItem

    Also make sure you send the parameter using json in the body.

    {

       "ItemNo": "TEST"

    }

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,190 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,968 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans