Is it possible to pull down the MailNickname into two fields I created in an entity called, Created By and Modified By when someone creates a row or updates a row from an app? In my organization, MailNickname is the employee ID.
If not, is there a way for the app to do this?
Solved! Go to Solution.
Hi @TesDA
You could use a Power Automate Flow to do this. Get the MailNickname using the Office 365 Users connector and populate the fields in CDS each time the records are created / updated in CDS. However, you would need to build a Flow for each entity you have these fields on and the Flow would also run very often that you would have to watch your Flow run usage. I would not recommend this approach.
An alternative would be to create a MailNickname field on the User entity in CDS. Populate this as a manual one-off task (if there are not too many users), or using a Flow if you have a lot of users. Then on each entity form where you have the OOTB Created By and Modified By fields place a quick view form of the User entity that has the MailNickname field displayed. For Views you can also show the Created By and Modified By User's MailNickname.
Hope that helps.
-----
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".
Im trying to implement your flow workaround. For some reason its throwing an error on the Created By in CDS. Do you know how to convert the Created By in CDS to what it would be looking for as the ID in Office 365 Users - Get User Profile? I tried Created By Type as well but that didn't work.
Hi @TesDA ,
The Get User Profile action is looking for the users UPN which is essentially the email address that they log into Office 365 with.
To get the UPN from Created By you need to first add a Flow action to get the CDS User record using Created By as the input ID. Then, from the CDS User record, put the User Name field (which is the login email address) into the Get User Profile action.
-----
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".
@HSheild Im so close!!
Everything in the flow is working fine except the last item, update a record. Im getting the following error:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
23 | |
5 | |
4 | |
3 | |
3 |
User | Count |
---|---|
24 | |
8 | |
7 | |
6 | |
5 |