Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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