Closed SarviH closed 3 months ago
Hi @SarviH ,
Thank you for your feedback.
This repo (https://github.com/jordimontana82/fake-xrm-easy) is for v1 of FakeXrmEasy, whereas the sample code you posted is for v2 which has its own repo here:
https://github.com/DynamicsValue/fake-xrm-easy. :)
I see a couple of things in your middleware.
1) The .Add() methods should appear before any Use() methods. 2) Then, the order of the Use*() methods is important. If you are using pipeline simulation then the .UsePipelineSimulation() call should be called before any other. Here's an example: https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/plugins/pipeline/basics/
3) There is no need to call .UseMessages() many times, only once should be enough. 4) You can call .AddFakeMessageExecutors many times, but this is only needed if the FakeMessageExecutors live in different assemblies (dunno if this is the case), otherwise one call is also enough: https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/middleware/
Can you try making these changes and see if that resolves it?
Hello @jordimontana82 , Thanks for your reply and useful suggestions. Sure I'll check all tomorrow and get back to you.
Hello @jordimontana82 , I tried some modifications on Middleware here is my code :
but I still have 0 results in privileges, the strange thing is that, the AddPrevilegesRoleRequest is working fine and I see the privilege associated to the user, here is my code :
but when I try to use RetrieveUserPrivilegesRequest it returns 0 role privileges, and here is the code :
Please let me know if you have any idea about this, thanks in advance :)
Hello dear @jordimontana82 , finally I found out how to resolve this probleme, actually it's not an issue, just need to manipulate the response of the message which is not out of the box in the mock, simply this solved my problem, I'll share here maybe helps the others :) We can close the issue. Thanks again
Discussed in https://github.com/jordimontana82/fake-xrm-easy/discussions/613