I have been trying to access the "Target" and "RelatedEntities" parameters from InputParameters of Plugin Context.
Here is the snippet of code I've been using:
var targetEntity = ((EntityReference)context.NativeContext.InputParameters["Target"]);
var relatedEntity = ((EntityReferenceCollection)context.NativeContext.InputParameters["RelatedEntities"])[0];
values of entities in classical view:
targetEntity would be referring to "ABC" entity
relatedEntity would be referring to "XYZ" entity
values of entities in Unified View App:
targetEntity would be referring to "XYZ" entity
relatedEntity would be referring to "ABC" entity
why is this difference so and is there any way out of this?
any help would be greatly appreciated.