Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

Passing parameters to retrievemultiple plugin message

Posted on by Microsoft Employee

Hi there ,

In my retrievemultiple plugin message , in the Post stage i need to modify the queryexpression in order to filter an associated view.

The filter is based on some parameters , it can be a hardcoded parameters or parameters from the form.

does anyone knows how can i pass parameters to the retrievemultiple plugin .

thanks in advanced

  • veginati Profile Picture
    veginati 225 on at
    RE: Passing parameters to retrievemultiple plugin message

    ConditionExpression queryCondition = new ConditionExpression("new_principal", ConditionOperator.Equal, principal.Id);

                                   FilterExpression fexp = new FilterExpression()

                                   {

                                       FilterOperator=LogicalOperator.And,

                                       Conditions = {queryCondition }

                                   };

                                   qe.Criteria.AddFilter(fexp);

                                   context.InputParameters["Query"] = qe;

    Like this u can add condtions. you can modify the query how ever you want.

    This is possible in Pre-Operation.

    In Post-Operation Plug-In you can't modify the query that to you can't get the query parameters as expected.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Passing parameters to retrievemultiple plugin message

    Hi,

    You can load the selected values in your plugin by webservice with an retrieve-request...

    In CRM 4.0 you also have the possibilities to pass the params over the additionalparams-attribute of a lookup!

    Best regards,

    Andreas

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Passing parameters to retrievemultiple plugin message

    Andreas hi,

    the configuration solution is good  howerver, what if i dont want to pass some hardcoded values, what if i want for example pass some dynamic value from the client side like , for example selected lookup item guid?

  • Re: Passing parameters to retrievemultiple plugin message

    Hi,

    Below is the link which tells you about the passing parameters to a plugin using retrievemultiple query.

    guruprasadcrm.blogspot.in/.../plugin-on-retrieve-multiple-message-in.html

    I hope above link will help you.

    --

    Thanks and Regards

    Sandeep Sharma

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Passing parameters to retrievemultiple plugin message

    Hi,

    Here you can find the description to pass parameters to a plugin: gonzaloruizcrm.blogspot.co.at/.../adding-configuration-to-plugins-in-crm.html

    Best regards,

    Andreas

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans