I'm trying to debug a plugin in Dynamics 365 on-prem v9.1.13. In a specific code block, I'm dealing with two variables: targetEntity and relatedEntity. In the Classical view, let's call the values of these variables X and Y respectively. However, in the Unified view, their values seem to swap, meaning targetEntity becomes Y and relatedEntity becomes X. Additionally, I noticed that the context variable also differs slightly between the two views, despite the exact same event being triggered in both cases. Can someone explain why this swapping of values is happening between the Classical and Unified views, and why the context variable shows differences even though the events triggered are exactly same?
Here is the code block that I am concerned about :
var targetEntity = ((EntityReference)context.NativeContext.InputParameters[/Target/]); var relatedEntity = ((EntityReferenceCollection)context.NativeContext.InputParameters[/RelatedEntities/])[0];
Here is the change in the context between the Classical View(left) and the Unified View(right):
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.