Skip to main content

Notifications

Dynamics 365 general forum

Dynamics 365 Create a post on behalf of the owner record

Posted on by 385

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

  • Johnny Gong Profile Picture
    Johnny Gong 6,482 on at
    RE: Dynamics 365 Create a post on behalf of the owner record

    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

  • alexyou Profile Picture
    alexyou 385 on at
    RE: Dynamics 365 Create a post on behalf of the owner record

    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?

  • Johnny Gong Profile Picture
    Johnny Gong 6,482 on at
    RE: Dynamics 365 Create a post on behalf of the owner record

    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

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.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans