Adding Custom Fields to the Dynamics Marketing Events Portal
Jordan Hohepa, 30 June 2020
With Dynamics 365 Marketing you can directly connect D365 with a customer-facing portal for managing Events. This Event Portal is built using the Angular framework and fetches data from Dynamics 365 using an Events API configured by Microsoft. Although you can customize the entire frontend by downloading the Events Portal project from Microsoft Github, you’d need to make changes in both Dynamics 365 and in the Angular project for backend customizations. This blog will run through a quick example of adding a custom field to the Events API and configuring it to be displayed in the Events Portal.
First, navigate to Dynamics 365, open Advanced Find and search for the Entity ‘Website Entity Configuration’. The screenshot above shows a new Website Entity Configuration record I’ve created for the Event Entity. In the Selected fields I’ve added an Array of the custom fields I want to pull through, which in this case was a Single Line of Text field called Custom Text. If I wanted to add more, I would just add fields to the Array like [“mag_customtext”, “mag_customtext2”, “mag_customtext3”].
Once the record has been updated the next part would be to add the field to the Events Model. The screenshot above shows the Event Model in the Angular project. In here we need to add the ‘customFields’ property and in my case reference a Custom object which I created named EventCustom. This will hold all your custom fields like ‘mag_customtext’.
With that it’s ready to use and can be referenced on your pages where the Events Model is used. A quick example of this can be shown below. In my case I added my custom text to the main Events page under the Event Name.