Why Client script was not working properly on HR case?

Deepika61
Tera Contributor

Hi All ,

Actually i have created one client script to make fields visible and mandatory based on other field choice selected, Actually whenever we create a case (RP) created from portal then client script working fine, but whenever i am trying to create a case from native view, then client script not working properly

 

Client script

Deepika20_0-1696595161696.png

 

On the case form after creation on the case form it will appear both the fileds 

Deepika20_1-1696595263402.png

but after change one the choice value its seams to working fine

Deepika20_2-1696595353836.png

 

please help me to reslove this

 

Thanks

Deepika

 

 

10 REPLIES 10

Brad Bowman
Kilo Patron
Kilo Patron

Ensure the UI Type is set to All

BradBowman_0-1696595661596.png

Also, whenever setting Display/Visible to false, make sure the field/variable is NOT mandatory first in the script.

 

Voona Rohila
Kilo Patron
Kilo Patron

Hi @Deepika61 

Can you please share the complete client script code?

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepika61 

are you submitting record via record producer and expecting the client script to work on target record?

if yes then ensure your catalog client script runs on Target record as well

Ensure Applies on Target Record is true

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

@Ankur Bawiskar 

From the portal its working fine but when i am trying create a case from native its not working, Basically from portal we have a RP , we can submit a request, its working from, but from native view, when we "create case", basically here based on the HR service selected, we make few fields visible though "case create config". but this client script not working on this page

Deepika20_0-1696829948123.png