cancel
Showing results for 
Search instead for 
Did you mean: 

Business Central Connector - List Records

For some reason, the Business Central connector doesn't have the ability to list records. You can get a single record, but you need to know the Row ID which isn't discoverable in any way other than having a Flow trigger off of one of the BC events (when a record is created, etc.). This is a major limitation of the usefulness of this connector.

Status: New
Comments
MrPrestonR
Regular Visitor

Please oh please make this action for the Business Central connector!! 

jacobn
New Member

This will make the connector infinitely more useful!

gwengreniuk
Frequent Visitor

Is there some other way that people are able to update records in BC from an external source?

For example I have a D365 CE flow that we want to update the customer in BC, but as the customer already exists in BC (and D365 has the Customer Number stored), I need some way to know what the ID is in Business Central. The Get connector only accepts the GUID, and there's no Get to Get the GUID from the Customer Number, so the update/delete actions in the BC connector seem unusable except if the trigger is also Business Central as a source.

This has been on the list for 2 years, so just wondering if people have found a way around it or just aren't using it.

Any suggestions / ideas appreciated!

Thanks


Garrett

RobF
Advocate I

Hi @gwengreniuk 

 

I've been facing a similar problem recently, trying to figure out how to get a journal batch GUID.  A few weeks ago I knew little about APIs, URIs, GUIDs, or JSON but thankfully from some very informative blog and forums post I managed to cobble something together that ended up working.

 

  1. Create a flow with a manual trigger and add the HTTP action with GET method.
  2. Enter the URI for the endpoint from the API section of MS Developer site.  This was the missing piece for me, because initially I was stuck trying the ODATA and SOAP URIs from the Web Services page in BC before I found this.  The format for the URI when using the Basic connection method is https://api.businesscentral.dynamics.com/v2.0/tenantid/environmentname/api/v2.0/companies(companyid)/endpointname
  3. Run the flow, open the run history, and from the output of the HTTP action, copy all the text found in the Body section.
  4. Edit the flow, add a Parse JSON action after the HTTP action, enter the HTTP Body field as the input for the Parse JSON, and then click on 'Generate from sample' and paste the body text from step 3 above.
  5. The table fields published to the endpoint URI that you used will now be available as output fields of the Parse JSON action that you can use in subsequent steps.
  6. In the HTTP action you can add filter$ to the Queries section to filter the source data feed.  For the Customer endpoint, for example, you could enter number eq 'xxxx' to get the record for a single customer as input to the Parse JSON action, which then will output the id field, which is the GUID value for the customer.

 

This enabled us to build a flow that dynamically selects a journal batch based on the batch name included in some custom SQL data, gets the GUID for the batch from the journal endpoint, populates journal lines for the batch from a SQL table, and then passes the GUID into a BC Execute action to post the batch.

 

I look forward to seeing improvements to the BC connector in Power Automate that will hopefully eliminate the need for these extra steps.