Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

*This post is locked for comments

  • 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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans