web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

"Target" parameter in InputParameters of plugin Context

(1) ShareShare
ReportReport
Posted on by 12
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.
I have the same question (0)
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Where is the NativeContext property in the code snippet you provided. 
    This property is not found in the IPluginExecutionContext interface.
     
    Do values ​​of entities in classical view refer to creating entities in the advanced settings to execute the plugin?
     
    Best Regards,
    Dengliang Li
     
  • NT-29050956-0 Profile Picture
    12 on at
    NativeContext holds the plugin Context 
    NativeContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

Under review

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans