Breaking news from around the world
Get the Bing + MSN extension
The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
We were recently working on a custom virtual entity provider.
While going through the Microsoft documentation https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/virtual-entities/custom-ve-data-providers . We noticed that it’s a good starting point, but some pieces of the puzzle or missing or well hidden.
As I was reading the blogpost of Jason Lattimer https://jlattimer.blogspot.be/2017/12/creating-custom-virtual-entity-data.html which will get you up to speed real fast. I noticed that we bumped in to the exact same questions and obstacles, for example “I’m still wondering how you’d go about debugging with the Profiler with no steps (remember the TBD earlier?).” Well that makes both of us.
Another question we struggled with was, how to retrieve the configuration from the new data source we created during the registration? (which in the end is the goal of this entity…)
There is currently no example on how to do this in the documentation. But after reviewing what has been added to the Microsoft.Xrm.Sdk.Data Namespace https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/virtual-entities/api-considerations-ve
we came up with the following easy solution.
EntityMetadata dsConfig = service.GetEntityMetadata(context.PrimaryEntityName);
Entity dataConfiguration = service.Retrieve("<<YOUR_DATASOURCE_CONFIG_ENTITY>>", dsConfig.DataSourceId.Value, new ColumnSet("<<YOUR_DATASOURCE_CONFIG_ATTRIBUTE>>"));
string externalUrl = dataConfiguration.GetAttributeValue<string>("<<YOUR_DATASOURCE_CONFIG_ATTRIBUTE>>");
This retrieves the data from the configuration record and used like any other entity in your plugin.
After creation of the data source configuration entity, you can add custom attributes for configuration that you can read using the code above.
This will help to keep the data source as flexible as possible and manage all of the parameters from the data source configuration entity.
The post Custom virtual entity provider data source configuration appeared first on Thrives.
Business Applications communities