Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Unable to assign ownerid/team for a custom entity.

Posted on by 25

Hello,

I am running into a problem when trying to update/assign the ownerid to a team id for CUSTOM entities only. It is nto problem when I do this to an Account or Contact entity, but when I try the same calls for a custom entity, I get a 400 message. This only occurs when updating the ownerid for the custom entity. i am able to update the other custom entity fields without issue if I omit the owner id. 

This works for an Account entity:

URI: myorg.crm.dynamics.com/.../accounts(1a265a19-76cb-eb11-bacc-0022481d07ab)
JSON:
{
"accountnumber": "12",
"name": "Account Name",
"telephone1": "3331234567",
"emailaddress1": "demo@myorg.us",
"new_mbaccountrep": "Rep",
"new_accounttype": "100000001",
"statuscode": 1,
"primarycontactid@odata.bind": "contacts(f4154341-44cb-eb11-bacc-0022481e3102)",
"ownerid@odata.bind": "teams(d9653907-c799-eb11-b1ac-000d3a9dfae9)"
}

However, the same type of lookup on a custom entity fails:


URI: myorg.crm.dynamics.com/.../new_entities(1a265a19-76cb-eb11-bacc-0022481d07ab)
JSON:
{
"new_format": "Format",
"new_frequency": "Frequency",
"new_inactivewarning": false,
"new_myorgid": "12",
"new_name": "Name",
"new_publicationid": "1a265a19-76cb-eb11-bacc-0022481d07ab",
"ownerid@odata.bind": "teams(d9653907-c799-eb11-b1ac-000d3a9dfae9)"
}

Server returned HTTP response code: 400 for URL: https://myorg.crm.dynamics.com/api/data/v9.0/new_publications(1a265a19-76cb-eb11-bacc-0022481d07ab)?$select=createdon

If I leave out the ownerid, it works just fine:

URI: myorg.crm.dynamics.com/.../new_entities(1a265a19-76cb-eb11-bacc-0022481d07ab)
JSON:
{
"new_format": "Format",
"new_frequency": "Frequency",
"new_inactivewarning": false,
"new_myorgid": "12",
"new_name": "Name",
"new_publicationid": "1a265a19-76cb-eb11-bacc-0022481d07ab"
}

Is there some setting or security constraint that needs to be adjust?

Thanks

  • JDCv2.0 Profile Picture
    JDCv2.0 25 on at
    RE: Unable to assign ownerid/team for a custom entity.

    Thank you, this was exactly the problem. Added the proper permissions and now the updates work as expected. 

    </jdc>

  • Suggested answer
    Charan Raju C R Profile Picture
    Charan Raju C R 3,155 Super User 2024 Season 1 on at
    RE: Unable to assign ownerid/team for a custom entity.

    Hi JDCv2.0,

    Please check whether the owning team (one you're assigning) has a role with sufficient create permission for this custom entity.

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans