Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to retrieve the Survey Instance ID (sysparm_survey_instance) inside a sys_cs_field_script_valida

lidorz
Tera Contributor

 

Hi everyone,
I'm trying to build a custom field validator (sys_cs_field_script_validator) for a public Survey built using Survey Designer in ServiceNow (not Survey Lite).
My goal is to access the sysparm_survey_instance parameter in order to run a server-side check (via GlideRecord or Script Include) against previously submitted answers.

 

But instanceId is always returning undefined

lidorz_0-1752495282003.png

What is the correct and reliable way to get the Survey Instance ID (asmt_assessment_instance.sys_id) within the validator context?

0 REPLIES 0