Is this a valid sys ID - c1149291000000000000000000000001 ? This is generated by an AI agent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Is this a valid sys ID to consider - c1149291000000000000000000000001 ?
I have a story - STRY0149291 - to create a new field.
I'm using AI and I got the xml generated from AI agent, for a new field record.
I am able to load and commit that xml into my instance and can see the record as well in dictionary table with above mentioned sys id.
I've verified this sys id via - "gs.info(GlideStringUtil.isEligibleSysID('sys_id'));" and it returns true - that means its valid as per the function.
But just want to check if there is any issue to have so many zeros in a sys id...?
I'm not 100% sure if its fine to continue with a record having this kind of sys id.
Need some suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
43m ago
@shivanshsemwal If the method GlideStringUtil.isEligibleSysID returns true, you can safely assume it is a valid sys_id. If it were an invalid sys_id, you would have encountered an error while previewing or committing the update set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2m ago
From my understanding, `c1149291000000000000000000000001` is technically a valid ServiceNow `sys_id`. The fact that it contains a large number of zeros does not make it invalid. Since `GlideStringUtil.isEligibleSysID()` returns `true`, the value satisfies the expected sys_id format.
That said, I would separate **“is this sys_id valid?”** from **“should we use this approach?”**
I would suggest the following:
- There is no need to reject the record simply because the `sys_id` contains many zeros.
- Make sure it is exactly **32 hexadecimal characters** and does not already exist in the target instance.
- For normal record creation, I would let **ServiceNow generate the sys_id automatically**.
- If this XML is being used as a deployment/update-set artifact, I would preserve the `sys_id` generated by the source instance rather than manually creating one.
- I would also avoid using AI-generated or predictable sys_ids as a standard practice for creating future records.
So, for the current case, I don't see an issue with the `sys_id` purely because of the number of zeros. If the record has been successfully committed and the sys_id is unique and valid, it should be fine.
My main recommendation would be to avoid manually generating sys_ids going forward and let the platform handle them whenever possible.
