Hi,
I have a simple workflow that calls an action that creates a post when creating a new lead record. I'm the system administrator and I'm the one who created the workflow and action. My problem is that when other users create a lead record, the post is posted on my behalf instead of behalf of the user who created the lead.
Any ideas how to solve this?
Thanks
Hi Alex,
Appreciate for your update.
The post is a notification who create the record. You could refer to the following official document:
docs.microsoft.com/.../introduction-activity-feeds
ledgeviewpartners.com/.../how-to-create-custom-activity-feed-posts-in-microsoft-dynamics-365-crm
While you could manually set the Current User Id to create this workflow activities to meet your goal by developing.
Hope it would help.
Regards
Johnny
Sorry. Maybe my question was not clear or I did not understand your answer.
I want the WF to create the post as if the user (who activated the WF) wrote the post. From your answer, I understand,that I need to write a custom WF? I mean, do I need a developer to do this?
Hi Alexyou,
You could associate your user ID when you create the service in your plugin.
You could get your own id first as follow :
IOrganizationService service = serviceFactory.CreateOrganizationService(workflowcontext.UserId);
var id = workflowContext.UserId
The you just need to change the 'workflowcontext.UserId' to your own id in your plugin and update it to your workflow.
Hope it would help.
Regards
Johnny
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156