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)

Custom Virtual Entity Data Providers

(1) ShareShare
ReportReport
Posted on by 317

In the Latest Potassium version of Dynamics 365 did any one try to create custom virtual entity data providers ? The Microsoft blog -https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/virtual-entities/sample-generic-ve-plugin  does not provide accurate information. If any one is able to achieve , Please share the details.

*This post is locked for comments

I have the same question (0)
  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Srujan,

    Check this link-

    community.dynamics.com/.../dynamics-365-working-with-the-virtual-entities

    Hope this helps.

  • Philipp Lwn Profile Picture
    on at

    [quote user="Ravi Kashyap"]

    Hi Srujan,

    Check this link-

    community.dynamics.com/.../dynamics-365-working-with-the-virtual-entities

    Hope this helps.

    [/quote]

    Unfortunately, the link does not explain how to create a custom data provider. The default odata v4 data provider is being used.
    It only explains how to filter the virtual entity records with a RetrieveMultiple Plugin.

    Is there anybody who managed to create a custom data provider at all?

  • Suggested answer
    ARIFNIIT Profile Picture
    1,391 on at

    Hi Srujan,

    Refer below article to create virtual entity and set data providers.

    docs.microsoft.com/.../create-edit-virtual-entities

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/virtual-entities/custom-ve-data-providers

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Srujan,

    another useful link:

    https://community.dynamics.com/crm/b/exploringdynamics365/archive/2017/10/30/dynamics-365-working-with-the-virtual-entities

    Hope it helps!

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Philipp Lwn Profile Picture
    on at

    [quote user="Francesco Picchi"]

    Hi Srujan,

    another useful link:

    https://community.dynamics.com/crm/b/exploringdynamics365/archive/2017/10/30/dynamics-365-working-with-the-virtual-entities

    Hope it helps!

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

    [/quote]

    Unfortunately, Ravi Kashyap already posted that link. And it does not explain how to create a custom data provider.

  • Srujan K Profile Picture
    317 on at

    I think you guys provided pointers for Virtual Entity and not on how to create a Custom Data Provider for Virtual Entity.  Anyways thanks for sharing your thoughts.

  • Suggested answer
    Philipp Lwn Profile Picture
    on at

    Finally, i managed to create a custom entitydataprovider and associate it with a virtual entity.

    You cannot create the entitydataprovider with the ui. Only via code.

          var virtualEntityLogicalName = "cc_customvirtualentity";
          var providerName = "Custom Data Provider";
    
          // Get the retrievemultiple plugin id in the pluginregistration tool
          var retrieveMultiplePluginId = Guid.Parse("4ae24e43-18ff-46b6-9635-a6d9b7051930");
          var retrievePluginId = Guid.Parse("4ae24e43-18ff-46b6-9635-a6d9b7051930");
    
          // 1. Create an entitydataprovider with the Plugin Guids
          var provider = new EntityDataProvider()
          {
            Name = providerName,
            RetrieveMultiplePlugin = retrieveMultiplePluginId,
            RetrievePlugin = retrievePluginId
          };
    
          var providerId = crm.Create(provider);
    
          // 2. Update the DataProviderId in the virtual entity metadata 
          var req = new UpdateEntityRequest()
          {
            Entity = new EntityMetadata()
            {
              LogicalName = virtualEntityLogicalName,
              DataProviderId = providerId
            }
          };
    
          crm.Execute(req);
          
          // 3. Publish the entity metadata
  • Srujan K Profile Picture
    317 on at

    Hi Philipp - Thanks for the lead . Can you share more details on the code.. can u tell me which name space allows us to use new EntityDataProvider() ?

  • Verified answer
    xRM Edge Profile Picture
    on at

    Jason Lattimer posted this today:

    Creating a Custom Virtual Entity Data Provider

  • Suggested answer
    ARIFNIIT Profile Picture
    1,391 on at

    you can use late binding to create EntityDataProvider same as other entities.

    docs.microsoft.com/.../entitydataprovider

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