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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

having trouble when UpdateRequest instead of SetParentTeamRequest

(0) ShareShare
ReportReport
Posted on by 2,379

Hi all,

As mentioned in CRM 2016 SDK, "SetParentTeamRequest" message is deprecated and "UpdateRequest" is recommended instead of that (you can find details here)

I did some practices with new way but there is no changes when I update the team using the codes below.

When I use "SetParentTeamRequest" for the same operation, the operation is completed smoothly and the tool is updated.
There is no problem with the other deprecated methods, but having problems with "SetParentTeamRequest".
Have you tried before and encountered a similar problem?

Entity entity = new Entity("team");
entity["teamid"] = teamId;
entity["businessunitid"] = new EntityReference("businessunit", businessUnitId);

this.OrganizationService.Update(entity);


*This post is locked for comments

I have the same question (0)
  • Guido Preite Profile Picture
    54,086 Moderator on at

    can you try with this style of code?

    Entity entity = new Entity("team");
    entity.Id = teamId;
    entity["businessunitid"] = new EntityReference("businessunit", businessUnitId);
    this.OrganizationService.Update(entity);


  • Emre GULCAN Profile Picture
    2,379 on at

    Hi Guido,

    Thank you about response, but nothing has changed.

    BTW, I don't think there is no difference between "entity.Id = GUID" and "entity["teamid"] = GUID", because they referrer to PK. do you have any determination about them?

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Emre,

    If this doesn't work you should open a ticket with MS describing issue you experience.

    Also I would suggest to leave or feedback at CRM Ideas portal - ideas.dynamics.com/ideas

  • Emre GULCAN Profile Picture
    2,379 on at

    Hi Andrii,

    Before open ticket I want be sure about this issue what others have experienced. because it's one of very often unused requests (I think).

    I observed SQL commands of requests on SQL profiler and "SetParentTeamRequest" and "UpdateRequest" has different behavior.

  • Verified answer
    MBSteve Profile Picture
    25 on at

    It's a bit late in the piece, but I encountered the same issue. I found that passing through the "administratorid" as well caused it to work.

    In my example, I simply updated the administratorid with the same value as the original record.

    I have not done additional troubleshooting, but this appears to either because updating another attribute triggered the update message OR that there is some validation going on when changing the BU, but this validation fails silently.

    Auditing indicates that two separate update events happened as a result of the above, one for administrator and one for the BU.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans