Closed peterbjorkmarker closed 3 years ago
This is by design for that call, a null response indicates failure. The exception is in client.LastExecption. This behavior was brought forward from the crmsvcclient and maintained to support forward migration from crmsvcclient to dataverse serviceclient
If you use the client.Execute(org request), on failure it would throw an exception.
Ah that explains it. Thanks!
I went down the route of using ExecuteOrganizationRequest due to working around this behavior: https://github.com/microsoft/PowerPlatform-DataverseServiceClient/issues/143 (_serviceClient.ExecuteOrganizationRequest(request, "", false); - so I use SOAP instead of WebAPI.
I am using coding CrmSvcUtil generated early bound classes and OrganizationServiceContext, which is using ExecuteOrganizationRequest. I do realize I may be asking for trouble with this setup... so thanks for the support! :)
Closing the issue...
@peterbjorkmarker , No what your doing is completely fine. using strongly typed objects is supported for all the call types that support organization request types.
The system translated to the appropriate protocol based on what your doing.
The issue described in #143 is something we have having a hard time reproducing.
thanks MattB.
Microsoft.PowerPlatform.Dataverse.Client" Version="0.4.20"
Repro:
Expected: The client should parse the response and provide exception details
Actual: Response is null
Sample code: `