Auto close the Hr case

Mounika280
Tera Contributor

Once the user fills the questions in the record producer. If users selects “yes” for one of the question, then I want to auto close the case.

we are creating  record in hr core case

Note:

im unable to find the variables which user responded on backend.

so how to validate and close it

4 REPLIES 4

SANDEEP DUTTA
Tera Patron
Tera Patron

Hi @Mounika280 ,

What you can do is :

var ch = g_form.getValue('variable_name');
if(ch=='true'){
Add your code here to move the case/state to close;
}

Thanks,
Sandeep Dutta

Please mark the answer correct & Helpful, if i could help you.

Ankur Bawiskar
Tera Patron
Tera Patron

@Mounika280 

where will user select Yes? during record producer submission or on HR case record?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  While submitting record producer , the user will fill yes.

once hr case is created, need to close the state on hr case

@Mounika280 

if user submits case and selects Yes why would you close the HR case

No one will work on that case?

what's the point in creating a case and closing as soon as it's created?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader