I have the following code which tries to set the StateCode and StatusCode of an Incident in an aspx page which is called when I click on a link in the Case window (link added by modifying ISV.config).
I am trying to resolve the case and set the statuscode to a value of 9 (a custom statuscode). I get an error "couldn't process the request".
Any ideas why this code doesn't work?
Thanks,
Aravind Hande
----------------------
Dim myIncident As New incident()myIncident.incidentid = New Key()
myIncident.incidentid.Value = incidentID
'Set state to resolvedmyIncident.statecode = New IncidentStateInfo
myIncident.statecode.Value = IncidentState.Resolved
'set status to issue createdmyIncident.statuscode = New Status()
myIncident.statuscode.Value = 9
'Issue created
'Create the target object for the request.Dim target As TargetUpdateIncident = New TargetUpdateIncident()
'Set the properties of the target object.
target.Incident = myIncident
'create the request object.Dim update As UpdateRequest = New UpdateRequest()
'Set the properties of the request object.
update.Target = target
'Execute the request.
Dim updated As UpdateResponse = DirectCast(crmSrvc.Execute(update), UpdateResponse)
*This post is locked for comments
I have the same question (0)