You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Microsoft Dynamics 365 endpoint exposes a custom query option called cross-company . This option must be set on each request if cross company behavior is needed.
Currently we use the DataServiceClientRequestPipelineConfiguration.OnMessageCreating delegate to modify the url and add the query option for each request indvidually. This doesn't work for batch requests because we have to set the option on each batch item url.
Afaik the only way to modify each batch item url is to subscribe to the BuildingRequest event and modify the url there. The downside here is that we can't configure the query option for each request without manually subscribing and unsubscribing from the event.
While creating the batch request the top level request calls the ODataMessageWritingHelper.CreateRequestMessage which will execute the DataServiceClientRequestPipelineConfiguration.OnMessageCreating delegates but the batch items call ODataRequestMessageWrapper.CreateBatchPartRequestMessage which doesn't execute the delegates.
The text was updated successfully, but these errors were encountered:
The Microsoft Dynamics 365 endpoint exposes a custom query option called
cross-company
. This option must be set on each request if cross company behavior is needed.Currently we use the
DataServiceClientRequestPipelineConfiguration.OnMessageCreating
delegate to modify the url and add the query option for each request indvidually. This doesn't work for batch requests because we have to set the option on each batch item url.Afaik the only way to modify each batch item url is to subscribe to the
BuildingRequest
event and modify the url there. The downside here is that we can't configure the query option for each request without manually subscribing and unsubscribing from the event.While creating the batch request the top level request calls the ODataMessageWritingHelper.CreateRequestMessage which will execute the
DataServiceClientRequestPipelineConfiguration.OnMessageCreating
delegates but the batch items callODataRequestMessageWrapper.CreateBatchPartRequestMessage
which doesn't execute the delegates.The text was updated successfully, but these errors were encountered: