We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

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