Hi,
I am running into a strange issue recently. I have created a Opportunity Plug-in and registered on Create and Update steps. In Update step i have some business logic that will retrieve the SalesProcessStage (ActiveStageName) name, i am retrieving this using the leadtoopportunitysalesprocess.
When i Qualify a Lead there is some thing going wrong and when i debug the code its going to update plug-in call and its failing exactly at my fetchxml call that will retrieve some opportunity fields along with ActiveStage. Here is the query.
string oopfetchXml = "<fetch mapping='logical'>" +
"<entity name='opportunitysalesprocess'>" +
"<attribute name='activestageid'/>" +
"<filter type='and'>" +
"<condition attribute='opportunityid' operator='eq' value='" + opportunityId + "' />" +
"</filter>" +
"<link-entity name='opportunity' alias='oppsalesprocess' link-type='outer' to='opportunityid' from='opportunityid'>" +
"<attribute name = 'name'/>" +
"<attribute name = 'opportunityid'/>" +
"</link-entity>" +
"</entity>" +
"</fetch>";
When i tried to debug, the call was failing with below error during the above fetcXml Retrieval but when i ran the same fetchxml in XRMToolbox it works fine.
{"contextUserId=9d5b504c-4b3c-e611-80e7-5065f38ada11 has correct privileges but allowImpersonationOfOrganizationSystemUser == false. Parameter'user'=860ace9d-2597-436b-8f79-edddcd663f8c, callerId=860ace9d-2597-436b-8f79-edddcd663f8c."},
This plug-in is generic and contains the code for Create and Update MessageTypes. When i was debugging the Lead to Qualify i can see the call is going to two steps (Create/Update) in my my plug-in trace log and the above error is coming in Update step. My question is when i qualify a Lead does it go to Create and Update both the opportunity steps? I am wondering why the call is going to Update code block. I am unable to figure out what exactly the below error is?
{"contextUserId=9d5b504c-4b3c-e611-80e7-5065f38ada11 has correct privileges but allowImpersonationOfOrganizationSystemUser == false. Parameter'user'=860ace9d-2597-436b-8f79-edddcd663f8c, callerId=860ace9d-2597-436b-8f79-edddcd663f8c."},
*This post is locked for comments