Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to change incident status to resolved

343 views
Skip to first unread message

brian....@ordinatech.com

unread,
Mar 19, 2006, 4:34:40 PM3/19/06
to
This is the code I'm using in my aspx page. I'm able to change the
status to cancel and active put not resolved. I get this error
"<code>0x80040216</code>\n<description>An unexpected error
occurred.</description>"

SetStateIncidentRequest state = new SetStateIncidentRequest();

state.IncidentState = IncidentState.Resolved;
state.IncidentStatus = -1;

// Set the properties of the request object.
state.EntityId = new Guid(incidentId);
SetStateIncidentResponse stateSet =
(SetStateIncidentResponse)service.Execute(state);

Thank you

Brian

Matt Parks

unread,
Mar 20, 2006, 12:21:36 PM3/20/06
to
There is a different class for Resolving called
SetStateIncidentResoltuionRequest/response.

--

Matt Parks
MVP - Microsoft CRM


<brian....@ordinatech.com> wrote in message
news:1142804080....@i40g2000cwc.googlegroups.com...

SetStateIncidentResolution Message.url

brian....@ordinatech.com

unread,
Mar 20, 2006, 3:23:07 PM3/20/06
to
Matt, the SetStateIncidentResoltuionRequest() IncidentResolutionState
values are (Cancelled, Completed, and Open) there is no resolved.

Brian

Matt Parks

unread,
Mar 20, 2006, 11:25:30 PM3/20/06
to
"Completed" should be the right one. Not sure why it's named that though.

--

Matt Parks
MVP - Microsoft CRM


<brian....@ordinatech.com> wrote in message
news:1142886187....@t31g2000cwb.googlegroups.com...

brian....@ordinatech.com

unread,
Mar 21, 2006, 5:10:12 PM3/21/06
to
Matt, now I get this error when I set it to any of the above status
codes. The status of the incident is active.
State code is invalid or state code is valid but status code is invalid
for a specified state code.

SetStateIncidentResolutionRequest state = new
SetStateIncidentResolutionRequest ();

state.IncidentResolutionState = IncidentResolutionState.Completed;
state.IncidentResolutionStatus = -1;

// Set the properties of the request object.
state.EntityId = new Guid(incidentId);
SetStateIncidentResponse stateSet =
(SetStateIncidentResponse)service.Execute(state);

Brian

Juan José Gualde

unread,
Apr 6, 2006, 6:25:44 PM4/6/06
to
Hi Brian,
I had the same error, the solution is create another entity to resolving the
incident,
using incidentresolution and CloseIncidentRequest :

incidentresolution mysolution = new incidentresolution();
Lookup mylookup = new Lookup();
mylookup.Value = new Guid("0C61EBF0-14C0-DA11-8E8B-0007E9790AAC"); // my
incident-id to change to resolved
mysolution.incidentid =mylookup ;
Status mystatus = new Status();
mystatus.Value = 2; //completed
mysolution.statuscode = mystatus;

IncidentResolutionStateInfo datRes =new IncidentResolutionStateInfo();
datRes.Value = IncidentResolutionState.Completed;
mysolution.statecode = datRes;
CloseIncidentRequest mycir = new CloseIncidentRequest();
mycir.IncidentResolution = mysolution;
mycir.Status = -1;
CloseIncidentResponse myresponse = (CloseIncidentResponse)service.
Execute(mycir);

jjugalde

0 new messages