In this article, we take a look at how to expose a custom field on Virtual Entities within Microsoft Dynamics 365 Human Resources. Because Dynamics 365 HR is a sealed product, there is little room for customization. You can however, use custom fields to insert specific data. With the use of virtual entities, you can make an integration between Dynamics 365 HR and a Power Platform. Exposing custom fields on virtual entities within Dynamics 365 HR has some great benefits for you as D365 HR manager. It allows you to get more insights into the platform.
The virtual entity needs to be configured within Dynamics 365 HR. With this, the user should have access to the Dataverse, previously known as Common Data Service (CDS).
Configure Virtual Entity
There is already standard documentation available from Microsoft to configure a virtual entity. I wrote an article about this. You can read it here.
Creating custom fields
In this case, I will create a new custom field on Goal form. This entity is not available in Dataverse and with the help of Virtual entity, I will push this entity from Dynamics 365 HR to Dataverse.
Just like Virtual Entities, I wrote a detailed article about this so can learn how to create custom fields in D365 HR. We will go over this briefly in this article.
Step 1: Go to Goals form > Details
Click on Options > Personalize this page > + Add a field
The next step is to add a new field called ‘Weightage’.
When you’re done, click on ‘save’. Select the newly created field and click on ‘update’.
It shows the field on the details form.
Click on ‘view’ and save as with the new name ‘My view’ as seen below.
Step 2: Custom field setup
The next step of Exposing Custom Fields on Virtual Entities is setting up a custom field. Go to System Administration > Links > Setup > Custom fields. You should see this:
Select the tables from the list, enable the entities and apply the changes.
It will now display a message at the top like this:
Step 3: Generate Goals entity
Go to System Administration > Links > Integrations > Dataverse configuration
Select the entity from the list and click on Generate/refresh button.
Wait for it to be processed.
Once the processing is done, you can see a notification at the top. It should look like this:
Step 4: Validate Custom Field in Dataverse table
Go to web.powerapps.com > Select your environment > Data > Tables.
Now, the custom field is added in the entity.
Step 5: Create some data and validate in Power Platform
Add some data in a custom field in Dynamics 365 HR. The data should look similar to this within Dynamics 365 HR:
To check the data, I have create a small Power App.
This way, we can create a Custom Field on a Virtual Entity to use in the Power Platform. If you like this article, feel free to share it with others who might find it helpful! If you have any questions, feel free to reach out to us.
More how-to articles from the same author: