Notifications
Announcements
No record found.
how can i tell what the guid for a specific user is with and without coding?
*This post is locked for comments
Hi,
If you want it in a workflow, you can get the Executing User id and return an entity reference to the System User entity.
Hat tip to Guido (http://www.crmanswers.net/2013/10/get-current-user-inside-workflow.html)
public class GetCurrentUser : CodeActivity { [Output("Current User")] [ReferenceTarget("systemuser")] public OutArgument<EntityReference> CurrentUser { get; set; } protected override void Execute(CodeActivityContext context) { IWorkflowContext workflowContext = context.GetExtension<IWorkflowContext>(); CurrentUser.Set(context, new EntityReference("systemuser", workflowContext.InitiatingUserId)); } }
Hope this helps! I'd appreciate if you'd mark this as Answering your question.
Thanks,
Aiden
The requirement is I see an error in the plugin tracer log and need to see who that user is so I can determine the security so they can execute the plugin.
Is there an easier way?
If it's just for reference, I think you can export a list of system users and just look to see what the ID is in Excel. If you want to do it programatically, you can do a Retrieve on system user, using the ID from your log. That will give you back the user and all the details for them.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2