Development, Howto

How to Close Case using WebApi

Following JavaScript code can be used to Resolve Incident using JavaScript and WebApi:

 

4 Comments

  1. Hi, I just want to know is there any workaround to run the crm custom report using web api c#??

  2. HI Andrii,

    How do I update this to close the incident with a specific resolution reason. Works fine with -1 to use the default resolution reason but we have over 10 values that could be selected. The user is setting the reason as a field on the case form, which has been done to allow different filtered lists of resolution reasons per case type.

    Thanks, Chris

    1. Hello Chris,
      To define the reason you will have to pass proper value to “Status” field of the custom workflow action. It accepts whole numbers and if on UI side you have optionset for that I would recommend to create a hidden whole number field and on change of this optionset copy the value to that hidden whole number field and use it in workflow.
      Thanks,
      Andrew

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.