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 :
Microsoft Dynamics CRM (Archived)

How to Can I get values of input parameters in Parameter Collection ?

(0) ShareShare
ReportReport
Posted on by

Greetings,

I want get entity colletion in the input parameters. How to Get ?

community2.PNG

Thanks,
Bora Acici

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    Hello,

    That's unfortunately not possible. The InputParameters for a plug-in are fixed per Message and none of the Messages contain an Entity Collection.

    Which Message do you have your plug-in registered to? (Create, Update, etc.?)

      

    Read more about the different Messages and what will be passed in the plug-in context here:

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/understand-data-context-passed-plugin 

      

    For the common messages, here are is the primary key included in the InputParameters dictionary.

    You can access it by calling InputParameters["propertyname"]

    Message Property Name Description
    Create Target The created entity.
    Assign Target The assigned entity.
    Create Target The created entity.
    Delete Target The deleted entity.
    DeliverIncomingEmail EmailId The delivered email ID.
    DeliverPromoteEmail EmailId The delivered email ID.
    ExecuteWorkflow Target The workflow entity.
    Merge Target The parent entity, into which the data from the child entity is being merged.
    Merge SubordinateId The child entity that is being merged into the parent entity.
    SendEmail EmailId The sent entity ID.
    SetState EntityMoniker The entity for which the state is set.
    Update Target The updated entity.
  • Community Member Profile Picture
    on at

    Hi Michel,

    My Plugin message is AddUserToRecordTeam and Primary Entity is teamtemplate. Do you have any information ?

    Thanks,

    Bora Acici

  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    That would be this request:

    https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.addusertorecordteamrequest?view=dynamics-general-ce-9 

      

    From the looks of the documentation, you'll receive 3 InputParameters:

    1. Record (EntityReference)
      Reference to the record for which the access team is auto created
    2. SystemUserId (Guid)
      ID of system user (user) to add to the auto created access team
    3. TeamTemplateId (Guid)
      ID of team template which is used to create the access team

      

    You can access these for example:

    Guid systemUserId = (Guid)context.InputParameters["SystemUserId"];


  • Community Member Profile Picture
    on at

    Hi Michel,

    The example code is worked. Thanks for helps :)

  • Community Member Profile Picture
    on at

    Hi Bora Acici,

    Today I have same question and I have the answer after trying some code. As the input parameters are different based on plugin message and entity. I just post here hoping this can help other peoples to save time when finding the input parameters in plugin.

    ParameterCollection paramCollection = context.InputParameters;

    foreach(string k in paramCollection.Keys)

    {

    tracer.Trace("{0}", k);

    }

    foreach (object k in paramCollection.Values)

    {

    tracer.Trace("{0}", k);

    }

    Vinh Nguyen

  • Community Member Profile Picture
    on at

    Thanks a lot , you have saved my day !

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans