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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)
Active Discussion

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

  • 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans