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)

what, why, where and how should we use the plugin message 'Retrieve' and 'RetrieveMultiple' message while registering a plugin step in plugin Registration tool.

(0) ShareShare
ReportReport
Posted on by 2

Discussion:

1) what, why, where and how should we use the plugin message 'Retrieve' and 'RetrieveMultiple' message while registering a plugin step in plugin Registration tool.

2) What is the actual role of outputparameter and BusinessEntity in the plugin code when we use these messages.

3)How these messages impacts the performamnce of CRM?

*This post is locked for comments

I have the same question (0)
  • Abed Haniyah Profile Picture
    4,287 on at

    Hello,

    have a look to this article: Difference between Retrieve and Retrieve Multiple

  • gdas Profile Picture
    50,091 Moderator on at

    Hi Amit ,

    Retrieve and retrieve multiple message  giving you the definitions from name itself. The main difference is that when do you want to execute your plugins whether it's for retrieve single record retrieve using GUID or using query expression or fetch XML. Let say you are opening an entity form in that case plugin register with retrieve message will be execute.

    Now let say you are navigating entity list page in that case plugin register with retrieve multiple message will be execute.

    In an real life example from my experience I was registered a plugin with retrieve multiple message in a custom entity called Billing Account .Those billing accounts are basically coming from different integrated system using WCF service at real time.The WCF service is calling inside plugin to get the customer billing account data and In the plugin we basically create/update customer billing account getting from integrated system.Each customer can have multiple billing accont so we have added one subgrid in customer forms. Now when user will navigate to customer form subgrid will load internally plugin got fired , as plugin register in retrieve multiple message and retrieve  real time billing account data from Billing Account entity.

    Similar things you can do it for single record also.

    You should avoid those message and use those messages when you dont have any other options .And if you use those messages in the plugin make sure you are handling the proper validation with introducing additional field to validate when your plugin logic will execute. It's always good practice to register plugin with retrieve message and that's why MS having two messages due to performance.

    I would encourage to raise question number 2 in another thread to make thread clean and with  same subject related discussions.

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Hi Amit,

    Just to add to the above responses, which basically cover your question.

    In a few projects (not too many though), I had to use RetrieveMultiple to manipulate the data that is being displayed to the user.

    An example would be if you are displaying a field (such as Tax Id number), and you are not using Secured Fields, and want to display only the last four digits, you could manipulate the RetrieveMultiple results to change the values of the query that are returned to the user.

    Hope this helps.

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    Retrieve and retrieve multiple will be use when we want to execute plugin on an entity view.

    For output parameter, Please go to below link:

    community.dynamics.com/.../201585

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