Client Scripts for hr_case - How to:

joedumond
Tera Contributor

Am I missing something?

I don't see how client scripts get applied to record producers that create a case record.

The client scripts work for the RP (hiding variables onLoad, making them not mandatory).

But after they are submitted and hit the case table the client scripts dont take affect and all the variables appear on the case form.

I understand by definition that they are 'Catalog' client scripts but there has to be for this to work.

Its a logical extension of the task table.

Does anyone have experience in making this work?

6 REPLIES 6

brian_quinn
ServiceNow Employee
ServiceNow Employee

Joe,



Out-of-box, the HR record producers take variables (opened_for, short_description, description) and map them to fields on the hr_case table (which happen to have the same name).   After the RP has been submitted and a hr_case record has been created, they are no longer variables, they are normal fields.   At this point you can create UI Policies and regular client scripts to handle making the fields visible/mandatory/read-only.



Are there other customer variables/fields that you have setup in the record producer?



Thanks


Brian


I am creating full blown custom RPs to ask questions and pass that data to case forms.


in some instances, Y/N answers provide different paths questions for information.


For the variables on the RP that are not part of the relevant question tree, they are appearing on the case form (some mandatory) despite CCS that hide and make them not mandatory unless called by a UI policy.


Joe,



Can you provide a screen shot of your case form?   Are you using scripts to transform the variables to fields, or are you using a script in the record producer to do so?



Thanks


Brian


This is all occurring in the variable editor.


Variable Set with CCS and UI Policies


2015-08-13_9-27-56.png


Form in CMS, notice that report variables are hidden


2015-08-13_9-29-52.png


what shows up in Variable Editor on Case form


2015-08-13_9-32-43.png