You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
probably there is a bug in method: ExecutePluginWith<T>(ParameterCollection inputParameters, ParameterCollection outputParameters, EntityImageCollection preEntityImages, EntityImageCollection postEntityImages).
@eNeRGy164 committed in c484bf1 some changes to XrmFakedContext.Plugins (22.12.2017). I see he added, among others: ctx.OutputParameters.AddRange(outputParameters).
It makes that when you pass outputParameters object to this method it will never return real output params from a custom action inside it. You can still use the overloaded version of this method where you pass your context built earlier.
Should I fix it by just changing AddRange to simply assignment?
The text was updated successfully, but these errors were encountered:
@eNeRGy164 I'm wondering... why did you need the .AddRange() ? Maybe it was needed if you called multiple plugins with the same context when simulating the plugin execution pipeline? So it keeps adding output parameters?
I changed it into AddRange because multiple ExecutePlugin methods stack onto each other, and they would override any inputparameters that were set earlier.
This is okay for input (props & images) but probably not for output props, so I may have refactored this incorrectly.
Seems we also need a unit test to cover this expected behaviour,
Hi @jordimontana82,
probably there is a bug in method:
ExecutePluginWith<T>(ParameterCollection inputParameters, ParameterCollection outputParameters, EntityImageCollection preEntityImages, EntityImageCollection postEntityImages)
.@eNeRGy164 committed in c484bf1 some changes to
XrmFakedContext.Plugins
(22.12.2017). I see he added, among others:ctx.OutputParameters.AddRange(outputParameters)
.It makes that when you pass outputParameters object to this method it will never return real output params from a custom action inside it. You can still use the overloaded version of this method where you pass your context built earlier.
Should I fix it by just changing AddRange to simply assignment?
The text was updated successfully, but these errors were encountered: