cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KrispyB_UK
New Member

Custom connector calls to Bound and Unbound Business Central web service 404 NotFound but work in test connector?

 Custom connector calls from flows to Bound and Unbound Business Central web services show 404 "NotFound" but work in test connector?

I'm just trying out Power Automate as a possible workflow solution to go with our new Business Central app.  I've created both bound and unbound web services via ODatav4 in Business Central (On-prem) which run some very basic code just to prove they can be called and run some processing.    I've already created standard API's over tables which are working fine to insert / update / get data.

The API calls work fine in the custom connector 'test' area - show 200 and pull back the text string 'Done' which the method returns.  I've also tested via an online API tester, again works fine with a 200 response.  But anytime I put in a flow, it just fails the flow with a 404 "NotFound" with no other explanation or error.

KrispyB_UK_0-1629982705823.png

KrispyB_UK_4-1629983208980.png

 


But in a flow it fails every time with a 404 - which I created a much simplified one, even hardcoded the object ID I passed in a known record in case there's an issue with it picking up a record created in the same flow. I tried adding If-Match headers but I couldn't see in the documentation those are needed for a call like this.

KrispyB_UK_2-1629982936485.png

 

KrispyB_UK_3-1629983074042.png

 

The bound Business Central API code is this simple (for proof of concept)

KrispyB_UK_1-1629982756259.png

 

I've seen at least one other thread where something similar is happening, but no-one could suggest why it fails when called from a flow.  

The raw inputs of the api call within the flow:

{
    "host": {
        "connectionReferenceName""shared_bc-20test-20p2-20bound-20procs-5f67dc4612ece03a-ff1dc3f9b76a1d05",
        "operationId""StartPriceChangeProcessed"
    },
    "parameters": {
        "input""66"
    }
1 ACCEPTED SOLUTION

Accepted Solutions
KrispyB_UK
New Member

Rather than use the custom connector - I tried a HTTP action, and manually set the connection string etc in that, and it works fine.  So if you do need to make calls to Business Central code units exposed as bound or unbound web services, if you cannot get the custom connector working, try that.  It gets a 200 response with a payload showing the returned 'done' string.    This obviously wouldn't be what I'd want for methods returning data, but the API calls to BC to get/update/insert all work through the custom connector OK.  

KrispyB_UK_0-1630491880182.png

 

View solution in original post

1 REPLY 1
KrispyB_UK
New Member

Rather than use the custom connector - I tried a HTTP action, and manually set the connection string etc in that, and it works fine.  So if you do need to make calls to Business Central code units exposed as bound or unbound web services, if you cannot get the custom connector working, try that.  It gets a 200 response with a payload showing the returned 'done' string.    This obviously wouldn't be what I'd want for methods returning data, but the API calls to BC to get/update/insert all work through the custom connector OK.  

KrispyB_UK_0-1630491880182.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,304)