jordimontana82 / fake-xrm-easy

The testing framework for Dynamics CRM and Dynamics 365 which runs on an In-Memory context and deals with mocks or fakes for you
https://dynamicsvalue.com/get-started/overview?source=git
Other
263 stars 182 forks source link

Couldnt find reflected type for sdkmessageprocessingstepimage #605

Closed alan50 closed 1 year ago

alan50 commented 1 year ago

When trying to register a plugin image together with a plugin I get the following error: ""Couldnt find reflected type for sdkmessageprocessingstepimage"

The code to register plugin looks like this: fakeCrmContext.RegisterPluginStep<Donna.Crm.Domain.Plugins.OccasionPlugin.OnPostUpdate> (new PluginStepDefinition() { MessageName = "Update", EntityLogicalName = Occasion.EntityLogicalName, Stage = ProcessingStepStage.Postoperation, Mode = ProcessingStepMode.Asynchronous, FilteringAttributes = new string[]{"pdg_code","pdg_gratificationtext","pdg_campaignactivity"}, ImagesDefinitions = new PluginImageDefinition[]{ new PluginImageDefinition("preEntityImage", ProcessingStepImageType.PreImage) }})

I m using D365 onprem v.9 and the following FakeXRMEasy Packages: FakeXrmEasy.v9 2.3.0 FakeXrmEasy.Plugins.v9 2.3.0 FakeXrmEasy.Abstractions.v9 2.3.0

The registration works fine as long as I dont add an Image to it. Can you help with this? Many thanks!!!

jordimontana82 commented 1 year ago

Hi Alan @alan50 ,

Thanks a mill for raising this issue. That issue was resolved in version 2.3.2: https://github.com/DynamicsValue/fake-xrm-easy-plugins/blob/2x-dev/CHANGELOG.md

You need to either generate sdkmessageprocessingstepimage as part of your early bound entities, or let FakeXrmEasy use them for you, but not both, to avoid confusion.

Please give that version a go and let me know.

Also bear in mind this repo is for v1 of FakeXrmEasy and it's deprecated, we're tracking all new stuff in the new repo for versions v2 and above at https://github.com/DynamicsValue/fake-xrm-easy.

jordimontana82 commented 1 year ago

@alan50 more info about the specific issue and how it was addressed....

https://github.com/DynamicsValue/fake-xrm-easy/issues/95