Developer forum

Forum » Integration » Stock Location on D365 BC Cloud

Stock Location on D365 BC Cloud

Chris Søgaard
Chris Søgaard
Reply

Hi

I'm trying to get StockLocations from D365 BC Cloud. Plug-in unit is installed on customer BC.

Trying to call the endpoint with request for getting StockLocations like this will just result in a timeout:

<GetEcomData>
  <tables>
    <ProductStock type="all" importStockLocations="true" />
  </tables>
</GetEcomData>

Executing the request without the importStockLocations parameter works as intended:

<GetEcomData>
  <tables>
    <ProductStock type="all"/>
  </tables>
</GetEcomData>

Any ideas?


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Chris,
do you have an error message and where the errors occurs, is it in BC or in the Dynamicweb connector service?
Could you describe how your setup works? Can you execute that query from the Dynamicweb Batch and Live Tester tool?
Is it more than 30 min?
Kind regards, Dmitrij

 
Chris Søgaard
Chris Søgaard
Reply

Hi Dmitrij

Thank you for the response. There's no error message other than a timeout from the DW Backend, when trying to create the request.

I've setup an Integration Batch with Custom Request Add-In related to an activity/Data Integration. It never runs the activity because the Batch Integration gives a timeout. I'm not using the DW Connector Service for this client, but have the Plug-in unit installed on the client's BC and requesting this plug-in directly from Endpoints in DW Backend.

I've tried using the test tool to execute the request but that gives a timeout after approximately 10 min, but not 30 min.

There's definitely a lot of data on the client side, so I would expect it to take some time. Is there anyway to run this request with pagination, so we do not have to request all of it at once.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Chris,
yes, indeed the BC operation timeout for SOAP is 8 min. So it is needed either to make a feature request to support a paging for this data, but I am not sure if it will be implement
and when.
Another option could be to write a custom extension that will output the stock locations using some paging, but you will need some custom development in AL|
to make it. We have an example project available for download here:
https://doc.dynamicweb.com/downloads/integration#sideNavTitle1-3
which you can customize: OnBeforeGetProductStockRequest that is an event that you need to subscribe to and provide the output using custom development.
If you need some piece of code that is used for getting the stock statuses I can share it.

Another option could be to use the Endpoint-Odata providers that use the Odata queries but those are in beta version and should be already released in the last 9.10.1 release,
but I am not 100% sure if it works for that data import.

Kind regards, Dmitrij

 

You must be logged in to post in the forum