-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RetrieveRequestExecutor does not return correct response #142
Comments
Hi @Zerajima I am not sure if @jordimontana82 has implemented something that triggers plugins on the |
You're correct, it's pretty confusing, and we have Microsoft to that for that. RetrieveResponse does actually contain "Entity" field, however during the request execution pipeline, this value is stored in IExecutionContext.OutputParameters, under "BusinessEntity" key. The link I provided in first post describes the differences between message responses and IExecutionContext contents. There's a list of responses, that use different naming in response class and in IExecutionContext. I'm not sure where exactly this is handled in FakeXrmEasy, I assumed it would be in message executor, but if it's somewhere else, I apologize for misleading you. This is the code snippet, that works correctly on dataverse, but throws KeyNotFound exception when executed through FakeXrmEasy pipeline. |
In |
The pipeline should support any message (including Retrieve's). @Zerajima can you post a sample unit test to reproduce, please? FXE (short for FakeXrmEasy) passes in InputParameters from the incoming request and out to OutputParameters as well. But a unit test might be handy (along with your pipeline setup and how you are registering plugin steps) to reproduce in case we missed anything... |
Maybe it's related to this one too #124 |
Here's a sample test to demonstrate this issue. The IPlugin implementation should work properly on dataverse.
|
In response returned by RetrieveRequestExecutor.Execute method, the entity object is stored under "Entity" key.
This is not the same key, that dataverse returns. The actual key should be "BusinessEntity". This behavior is described in https://learn.microsoft.com/en-gb/power-apps/developer/data-platform/understand-the-data-context#outputparameters.
I ran into this issue when writing tests for plugin I wrote, for Retrieve message.
The text was updated successfully, but these errors were encountered: