Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to programatically re-open an Incident/Case that has been closed.
With a plugin in java (javaMSCRM).

My code:

SetStateIncidentRequest request = SetStateIncidentRequest.Factory.newInstance();

request.setIncidentState(IncidentState.ACTIVE);

request.setIncidentStatus(IncidentStateInfo.INT_ACTIVE);

Guid guid = Guid.Factory.newInstance();
guid.setStringValue(incident.getIncidentid().getStringValue());
request.xsetEntityId(guid);

ExecuteDocument executeDocument = ExecuteDocument.Factory.newInstance();
Execute execute = executeDocument.addNewExecute();
execute.setRequest(request);

WSGRECOSingleton.stub.execute(executeDocument, WSGRECOSingleton.crmAuthenticationTokenDocument, null, null);

This code return the next ERROR:
Error en el documento XML (1, 722). ---> No se esperaba < EntityId xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900