How to – Enable Notification in Model-Driven App (Dynamics 365)


By making use of appsetting and settingdefinition table, we can enable notifications in the Model-Driven App. (not sure if it is documented somewhere / or supported way) – so try in a trial environment.

I think the supported way is through customization.xml 

https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/events/form-onsave#enable-async-onsave-using-app-setting

Thanks to the below post and tweets by Mehdi EL Amri, which describes the steps to be followed.

https://xrmtricks.com/2021/05/26/a-glance-of-the-onload-event-on-a-model-driven-app-form-async-onload-event/

Basically, we need to add a new record inside appsetting table which will have reference to the settingdefinitionid of that particular setting (Alert notification early access) inside settingdefinition table along with id of the app to which we want it to be associated.

  • Let us get the settingdefinitionid for Allow notification early access.

  • App Id for the Sales Hub.

  • Here we are creating a new record through a console application

  • parentappmoduleid – appid of the model driven app
  • settingdefinitionid – id of the specific setting
  • uniquename – name
  • value – set as true

Now let us create a flow on the creation of contact which will send the notification. (create the notification record)

On creating the contact record, we can see the notification inside our Sales Hub.

Settings allow us to enable/disable toasts and set the toast duration as shown below

Hope it helps..

 

Advertisements

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

5 thoughts on “How to – Enable Notification in Model-Driven App (Dynamics 365)”

Leave a Reply to Anonymous Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.