How to retrieve the Survey Instance ID (sysparm_survey_instance) inside a sys_cs_field_script_valida
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 05:15 AM
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
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