Ankur Bawiskar
Tera Patron

@gazalagrawa 

code from record producer should work

share your script and config screenshots

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

@gazalagrawa 

not sure what was the issue but you didn't share the script, screenshots etc

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

Naveen20
ServiceNow Employee
Most likely cause: the value being assigned isn't a valid choice on sn_customerservice_case.contact_type, so the form renders it as --None--. Out of the box this field does not ship a "Portal" choice — typical values are along the lines of phone, email, web, chat, social (verify in your instance, as choices vary by release/plugin).

Try - Fix:

1. Confirm the choice exists. Go to System Definition > Choice Lists, filter table = sn_customerservice_case, element = contact_type. If there is no portal choice, add one with Value = portal (lowercase, no spaces) and Label = Portal — or reuse an existing value like web.
2. In the record producer's Script field, set the stored value (not the label):

current.contact_type = 'portal';

3. Check that no business rule on sn_customerservice_case (insert/before) is overwriting contact_type after the producer runs.

Quick test: open the created case in a list view to see the raw stored value — if it's blank, the choice doesn't match.

View solution in original post

Tanushree Maiti
Tera Patron

Hi @gazalagrawa 

 

Open your Record Producer in ServiceNow and

navigate to the Script section.

Add the following line at the top of your  producer script to target the contact type field

 

current.contact_type = 'portal';

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

AndersBGS
Tera Patron

Hi @gazalagrawa 

 

@please share your code from the record producer. By doing this, it will much easier to help you.

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/