mandatory field in catalog item in service portal issue

Codi
Tera Contributor

Hi guys,

we encountered an issue in the ticket created via service portal. What happened is when this ticket was created one of the mandatory field in catalog item is blank. So the problem is we cannot change the state of the ticket since they are asking for the value of the mandatory field.

1 ACCEPTED SOLUTION

Hi @Codi 

 

I assume its a drop-down

 

There is one way...!! check if it works for you...!!

 

Open the form - 

press below keys on keyboard , don't remove your fingers from button unless you press 'J' 

 

ctrl + shift + alt + j 

 

the below executer will open -- 

 

VishalBirajdar7_0-1695643990645.png

 

Write below code & click on "Run my code"  [upper right corner]

 

//use your variable backend name

//add one dummy option 

g_form.addOption('type of licence','test','test');
g_form.setValue('type of licence','test');

 

This will set the value to type of licence variable.

Now close the executor and save the form.

 

Let me know if this worked..!!

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

View solution in original post

13 REPLIES 13

Great...cool...🙌

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Ankur Bawiskar
Tera Patron
Tera Patron

@Codi 

So first you need to debug how user was able to submit ticket without filling mandatory fields.

If that's resolved then in future this issue won't come at all.

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

Hi @Ankur Bawiskar actually it is not happening right now because the latest tickets created is now working as expected but the challenge is we cannot put a value to the mandatory field under the affected ticket. Is there any option or way to put a value on the field manually?

@Codi 

you can try to do it from script using background script or from list

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