Sorry it has been a while since my last blog post, this scenario has taken a while to get it to the state where I was happy to show it off. Mainly due to my own lack of understanding of the intricacies of the D365 API, but also been busy external to the blog, you know real life.
- The Scenario (This part)
- Notifying the manager of a new Employee (This Part)
- PowerApp to display and update User Data
- Update Roles and Teams
The HR department is ramping up recruitment and new teams are being shaped to support all the growth.
One of the criticisms from the managers is that it takes a while for the IT / D365 administrators to get users in the correct teams and security roles so they can be effective in D365.
A clever chap in the management team suggested that they be given an app that would allow a manager to update the roles and teams (and other relevant parts of a user) without resorting to logging into D365 administration. Something they can use wherever they have WiFi or a data connection.
It would also be good to get a notification when they have a new employee, or someone is added to their reports.
This flow is quite simple, trigger an email when a user has the Manager field (parentsystemuserid) field updated. O365 will create the user for us (assuming you are in the cloud) and an administrator will still have to update the users manager.
Here, the attribute I am interested on is parentsystemuserid.
Next, just check to see if the manager is actually populated. In a lot of businesses, removing their manager is part of the process on off-boarding an employee, to tidy up selection lists etc.
Then, get the manager user record from D365 so that the email can be sent to it.
Told you it was simple. I am sure that this can have more logic – Do we need an approval step before assigning this user? Do we have to wait for HR to do some work and only activate the user once all the checks are done?
Next, I’ll step through the PowerApps set up to retrieve data from my reports.