Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to set 'modifiedby' field on Note entity through code?

Posted on by 505

I have created a custom workflow activity which copies notes from lead entity to custom entity.

It works fine however, 'modifiedby' field is always set to 'System'. I want to set this field to the one on the source note.

How can I do this?  CRM version is 9.1 online.

*This post is locked for comments

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: How to set 'modifiedby' field on Note entity through code?

    Hi,

    You can refer to below articles/ discussion. You can choose whatever that suit your case.

    community.dynamics.com/.../152282

    www.inogic.com/.../change-createdbymodifiedby-field-at-runtime-in-dynamics-crm-plugin

    missdynamicscrm.blogspot.com/.../crm-2011-2013-modify-createdon-createdby-modifiedon-modifiedby-using-SDK-CSharp.html

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: How to set 'modifiedby' field on Note entity through code?

    Hi Priyank ,

    How you are triggering the workflow ? Is it asynchronous or synchronous ?

    When a background workflow is configured as an on-demand process and is started by a user using the Run Workflow command, the actions that the workflow can perform are limited to those the user could perform based on the privileges and access levels defined by the security role(s) set for their user account , and modify by field should be fill with the user account who executing the workflow.

    When a background workflow starts based on an event the workflow operates in the context of the person who owns it, usually the person who created the workflow. In that case modify by field should be fill with the workflow owner.

    For real-time workflows you have the Execute As option and you can choose whether the workflow should apply the security context of the owner of the workflow or the user who made changes to the record. 

    If your workflow includes actions which all users would not be able to perform based on security constraints, you should choose to have the workflow run as the owner of the workflow.

    8053.workflow.png

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans