Cancel an Incident programmatically RRS feed

  • Question

  • Hi Everyone, 

    I have to cancel an existing Incident inside the crm programmatically, but I'm not able to do it. Someone has a suggestion? ( I managed to succesfully Resolve one, but if I try the same thing to cancel a case doesn't work, even it i try to update statecode and statuscode via update)


    Thursday, October 4, 2012 1:38 PM


  • You will need to use the SetStateRequest class to do this. The following sample from Microsoft shows how to do this. You just need to make sure the Status Reason field gets set to cancelled instead of completed as shown in the example.


    John Grace (Founder, North52) Simplifying CRM & xRM development
    How? Check out the Free Community Edition of Formula Manager at www.north52.com

    • Marked as answer by Draiden Thursday, October 4, 2012 2:49 PM
    Thursday, October 4, 2012 2:21 PM