web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Assigning a Record to the "Created By" using javascript

(0) ShareShare
ReportReport
Posted on by

Hello,

The requirement I have is to assign a record to the person whom created the record using Javascript. is it possible to do so?

Thanks

*This post is locked for comments

  • Suggested answer
    Drew Poggemann Profile Picture
    on at
    RE: Assigning a Record to the "Created By" using javascript

    Hi Fitsum,

    So when you create the record the person who created would be assigned the owner.  I assume you are trying to do this outside of creation?

    I know this is not JavaScript, but what about a workflow on demand that you could execute that sets owner to the person who created the record?

    Hope this helps even though it is not JavaScript...

    Thanks,

  • Verified answer
    ashlega Profile Picture
    on at
    RE: Assigning a Record to the "Created By" using javascript

    Hi,

     Since you are on dynamics 365, you should be able to do it like this:

     Xrm.Page.getAttribute("ownerid").setValue(Xrm.Page.getAttribute("createdby").getValue( ));

     Then save..

     Assign request(which you would have to use in the earlier versions) has been deprecated..

  • Fitsum Profile Picture
    on at
    RE: Assigning a Record to the "Created By" using javascript

    Thanks Alex. It worked.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans