Skip to main content

Posts

Showing posts from April, 2018

Dynamics crm apps: Enforce right app on login

     The new dynamics crm apps (Dynamics 365) is a great feature. Once it show up, I promised to my customer to create a few “masks” for crm to wear based on login user roles. So I did.       All looks good but one unpleasant surprise. After login, the Default app is always loaded. Users then have to find desired app in the list and load it. Few additional clicks, time – not a good user experience.       I have disable Default App from all users in settings but issue persisted. Well, coding.     1. Create an Enable Rule for some of home page ribbons. I added it to “Refresh All” button. Thanks to Scott Durow’s Workbench.     2. Code flow: - Create a JSON object to map apps to roles. I named Apps after roles and now it makes the mapping very convenient. * This hard code mapping works for me but there definitely a lot of option to generalize the selection * - Get logged in user roles names and use JSON mapping to get a right app name. - Validate current app name vs on