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)

AssignRequests work where Updates do not.

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Emre GULCAN Profile Picture
    2,379 on at

    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.

  • JDHannan Profile Picture
    on at

    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
    2,379 on at

    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
    on at

    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
    2,379 on at

    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.)

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