What will happen if column is missing on staging table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Everyone,
We had a column on the staging table called Response SLA Source (u_response_sla_source). The column name existed in the system, but its label was missing. Because of this, the field was not visible in the list view, form view, or even in the Show XML output.
To investigate the issue, we engaged ServiceNow support. Around 29 August, they removed the original field and recreated it with the same column name (u_response_sla_source) but with a proper column label.
We have several field mappings that use scripts, and some of those scripts include a condition similar to:
if (source.u_response_sla_source == 'cvc') |
As there is no else loop after if loop and u_response_sla_source is empty, it has started giving error.
Prior to 29 August, this condition never caused any issues. However, after the field was recreated, the code started evaluating this condition, and we began seeing the following error when the field value is empty:
Reference field value for alm_asset.model rejected: undefined
This occurs in the field mapping for the Model field on alm_asset. Since the choice action for the reference field is set to Reject, the record update is stopped whenever the script returns undefined.
My question is: What changed on 29 August that caused this behavior? More specifically, if the field effectively did not exist or was not accessible before, why was the condition not causing any issues previously, yet after the field was recreated the same code path started executing and resulting in errors?
Has anyone encountered similar behavior with recreated staging table fields or field mappings in ServiceNow?
@Ankur Bawiskar - Can you please guide me on this.
Thanks in advance
