Home General Discussion

IR to SR: Set classification

Gerhard_LiebelGerhard_Liebel Customer IT Monkey ✭
Hey everyone,

when i convert an IR to SR i also would like to set the classification. Can i do that?
Below is the code snippet that closes the IR. Could i just add another line that sets the desired Classification? If yes, can anyone help me with that line? I dont know how to get the GUID of the classification...

Best regards,
Gerhard

// Set the IR's Status/ResolutionDescription/ResolvedDate
    finalir.Status.Id = "2b8830b6-59f0-f574-9c2a-f4b4682f1681";
    finalir.ResolutionDescription = "This Incident was converted to a Service Request."   
    finalir.ResolvedDate = new Date().toISOString().split(".")[0];

Best Answer

  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Answer ✓
    Hi Gerhard,
    If you want to set the classification of the IR to something particular, then you can add the line
    finalir.Classification.Id = "some guid";

    To get the guid, one way is to open an IR in the portal which has the classification you wish to set, then open Developer Tools (F12 in IE), click on the Console tab, enter this command at the prompt:
    pageForm.viewModel.Classification.Id

    and press Return.
    The console will report the classification id. You can copy and paste that guid into the line above.


Answers

  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Answer ✓
    Hi Gerhard,
    If you want to set the classification of the IR to something particular, then you can add the line
    finalir.Classification.Id = "some guid";

    To get the guid, one way is to open an IR in the portal which has the classification you wish to set, then open Developer Tools (F12 in IE), click on the Console tab, enter this command at the prompt:
    pageForm.viewModel.Classification.Id

    and press Return.
    The console will report the classification id. You can copy and paste that guid into the line above.


  • Gerhard_LiebelGerhard_Liebel Customer IT Monkey ✭
    That did it! Thanks for the quick response!
Sign In or Register to comment.