Developer forum

Forum » Integration » Endpoint management - no PATCH option

Endpoint management - no PATCH option

Jon Thorne
Jon Thorne
Reply

Hi,

I was wondering why there is no PATCH option in the endpoint management page. As this is required to make udpates to records in BC. Is there another way to do this that I am not aware of?

Regards, Jon.


Replies

 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply

Hi Jon,

Well there is the option of doing an export via an activity, by using the OData Provider as source-provider and Endpoint Provider as destination-provider.

This is although limmit to sertain exports at the moment (https://doc.dynamicweb.com/documentation-9/integration/integration-framework-old-structure/odata/odata-v4-how-to#sideNavTitle1-7), but if this can help you then this could be a way?

BR

Matthias Sort

 
Jon Thorne
Jon Thorne
Reply

Hi Matthias,

Thanks this is a good option. Now I tried that and getting an error on creation of the activity (see below).

Any ideas? It seems to be related to the endpoint that I have selected. Should this be a GET or POST? Should the metadata url be the main url or also have the #company(..)/customers after it?

Regards, Jon.

--

Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply

Hi Jon

We overrule the post/get attribute when you do the setup in an activity so it doen't matter if "post" or "get" as we expect when you use the Endpoint-provider as source = get when destination = post :)

You might need to download the latest version of Endpoint Provider (https://www.nuget.org/packages/Dynamicweb.DataIntegration.Providers.EndpointProvider/) and OData Provider (https://www.nuget.org/packages/Dynamicweb.DataIntegration.Providers.ODataProvider/) on nuget as their could be a bug in the versions attached to your solution-version.

My own setup is with the Odata-V4 (https://doc.dynamicweb.com/documentation-9/integration/integration-framework-old-structure/odata/odata-v4-how-to#sideNavTitle1-9) where I have an endpoint with this URL: "https://api.businesscentral.dynamics.com/v2.0/7dd45d63-24fc-4edd-8ad8-5fd66b6f9733/BC17/ODataV4/Company('CRONUS%20UK%20Ltd.')/DynamicwebSalesOrder" then in the create new activity I have this: 

and in the destination I have it like this: 

and finally in the mappings I have it like this: 

I don't know if you only use the default-api on BC or the anti-pattern-way as I do in this example?

BR

Matthias Sort

 
Jon Thorne
Jon Thorne
Reply

Hi Mattias,

I was trying to use the default OData API, but always get this error when using Endpoint as a destination provider. It seems that it is not finding any fields for the mapping.

Regards, Jon.

 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply
This post has been marked as an answer

Hi Jon,

As I thought.. we currently only have pre-mappings for OData V4 only.. :(

but we also don't have the Endpoint Provider (when destination) open for multi-table-mappings, yet..... :(

Maybe if you choose a different source-provider than the OData Provider you can get more lucky?

BR

Matthias Sort

Votes for this answer: 1

 

You must be logged in to post in the forum