In a flow I wanted to stamp the full name of the user that created a note in CRM 365 to the beginning of a description like so:
Below are the trigger outputs of interest:
- _createdby_value (Created By)
- _ownerid_value (Owner)
- _modifiedby_value (Modified By)
I noticed the GUID does NOT match the GUID in Azure (first 4 of each GUID below)
The trigger output GUIDs:
That is when I realized that CRM 365 uses the users located in the systemuser entity
Next I ran the following command in SQL 4 CDS for XrmToolBox
SELECT * FROM systemuser
WHERE fullname='Anthony Fabozzi';
I then found that systemuserid has the matching GUID I need so in my flow I needed to do a lookup on this table to get the correct full name
To filter the row by the systemuserid GUID I created a List rows action with the following filter
Next create a Initialize variable action like so
For the next step create Append to Variable and select full name (this will automatically create an apply to each action as well)
The last step is an Update a row action which I used the expression called first to get only the first item in the array
After all of this I got the end result I wanted:
Hope this helps someone. Let me know if you have any questions.