Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

AssignRequests work where Updates do not.

Posted on by

We are trying to remove our Assign Requests from our plugins as they are deprecated. Microsoft says to replace them with Update Requests. However, we are experiencing no end to the problems as a result of this.

I'm going to try to simplify this down because we actually have a very complex solution.

We have a custom entity called Form

We have a Post Update plugin on Forms we will call ReassignForm

We have a Post Update plugin on Forms we will call SetTitle - this one has a Post Image with all of the attributes.

If we have the Assign Request inside ReassignForm, everything works fine - this reassigns the Form to a different User in a higher Business Unit (the User running it has Parent/Child BU Read on Forms).

If we have the Update Request inside ReassignForm, we get an error saying that we don't have Read permissions on Forms.

Why does an Update Request need to read from the Form when an Assign Request does not?

Microsoft says to replace Assign Requests with Update Requests but it does not seem to be that trivial. Does anyone have any insight on this?

Thank you

*This post is locked for comments

  • Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: AssignRequests work where Updates do not.

    Everything is good in your Update request.

    Can you paste your exception here? Actually I'm still think about your privileges.

    Other way, you can monitor your request (Assign and Update seperately) from Sql Profiler. Maybe update request does not perform as expected (because of your CRM 2016 updates / SDK dll versions etc.)

  • JDHannan Profile Picture
    JDHannan on at
    RE: AssignRequests work where Updates do not.

    Entity updateForm = new Entity("itrak_form");
              updateForm.Id = passedForm.Id;
              updateForm.Attributes.Add("ownerid", newOwnerId);
              service.Update(updateForm);

    This used to be:

    AssignRequest assign = new AssignRequest
                    {
                        Assignee = newOwnerId,
                        Target = passedForm.ToEntityReference()
                    };
                    service.Execute(assign);

    newOwnerId is an EntityReference, passedForm is an Entity for what it's worth.

  • Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: AssignRequests work where Updates do not.

    Hi,

    Can you copy / paste your code here?

    Actually I upgrade my all deprecated methods to Update Request but everything is fine on my tests (except SetParentTeamRequest)

  • JDHannan Profile Picture
    JDHannan on at
    RE: AssignRequests work where Updates do not.

    The problem is absolutely related to UpdateRequest. The user has User level Assign and Update on Forms. If I call UpdateRequest to change the Owner to someone in a higher Business Unit, we get the error that we don't have Read permission on Forms. If I call AssignRequest to change the Owner to someone in a higher Business Unit, it works fine. It is not an error inside the plugin as it doesn't mention the plugin in the error message. It is an error in attempting to retrieve the Post Image.

    If I take the Image off, then UpdateRequest or AssignRequest both work correctly - however I need the image or I have to completely redesign my logic (and we probably have 10 different plugins that are experiencing this problem)

  • Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: AssignRequests work where Updates do not.

    Hi,

    if I do not get it wrong, your problem not related to UPDATE request.

    Probably systemuser not have "READ" privilege for that entity.

    Have you ever tried "AssignRequest" with same systemuser that has exception? Because " "AssignRequest" throws same exceptions if you don't have enough privileges on 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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans