Closed lcbotha-braintree closed 9 months ago
I've managed to resolve it. If anyone else experience the issue its because you need to use the ToEntityRefernce
function instead and not manually assign the EntityReference like I did.
@lcbotha-braintree Glad you got it working. I believe it must be the same issue as https://github.com/DynamicsValue/fake-xrm-easy/issues/107.
Btw this repo is for legacy version v1, the new versions (2.x and 3x) live in several repos under the DynamicsValue organisation: https://github.com/DynamicsValue/fake-xrm-easy
Describe the bug I'm trying to use FakeXrmEasy to mock the context and create an IOrganizationService which is then used by the rest of the C# .net core web API functions to query data. The existing calls uses the CrmServiceContext to query the data from dataverse while it seems like if we pass in the service client created by FakeXrmEasy, it doesn't work and we get an error querying the data.
To Reproduce
Expected behavior The IOrganizationService from FakeXrmEasy does not work when using it within the CrmServiceContext generated by Early Bound Generators.
FakeXrmEasy and Dynamics 365 / CRM version FakeXrmEasy.v9 (3.3.3)