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 365 | Integration, Dataverse...
Suggested answer

How to copy 'ownerid' column field value in dataverse table using Azure Data Factory data flow pipeline?

(0) ShareShare
ReportReport
Posted on by 5

As owner field is not a lookup field and its data type is GUID facing issues in adding the value to OwnerId field. Please suggest  a way to make it happen. Thank you.

I have the same question (0)
  • Leco Lv Profile Picture
    on at
    RE: How to copy 'ownerid' column field value in dataverse table using Azure Data Factory data flow pipeline?

    Hi partner,

    Does it apply to the following scenarios?

    community.dynamics.com/.../how-to-copy-ownerid-column-in-another-dynamics-environment-table-in-azure-data-factory

  • Suggested answer
    DAnny3211 Profile Picture
    11,389 on at
    RE: How to copy 'ownerid' column field value in dataverse table using Azure Data Factory data flow pipeline?

    hi

    To set the value of the OwnerId field in Dynamics 365 when the value is not available as a lookup field, you can use the following steps:

    Retrieve the user or team record for the desired owner and retrieve its GUID.

    Set the OwnerId field value to the GUID retrieved in step 1.

    Here's an example of how you can achieve this in C# code:

    // Retrieve the user or team record for the desired owner

    Entity owner = _service.Retrieve("systemuser", new Guid("USER_OR_TEAM_GUID"), new ColumnSet("systemuserid"));

    // Set the OwnerId field value to the retrieved GUID

    Entity myEntity = new Entity("my_entity");

    myEntity.Attributes["ownerid"] = new EntityReference("systemuser", owner.Id);

    _service.Create(myEntity);

    In this example, replace "USER_OR_TEAM_GUID" with the GUID of the desired user or team record. Also, replace "my_entity" with the logical name of your entity.

    Note that if you want to assign the record to a team, you can use the "team" logical name instead of "systemuser" in the EntityReference constructor.

    DAniele

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 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 74 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans