What are sys_id's that start "__ENC__" ?

davidmcdonald
Kilo Guru

We've had an issue where something's sys_id has been changed, which has caused a few headaches as it was a user role.

In my search to see what took the original sys_id, I've run into some table's that act a little differently when viewing their sys_id's.

Anyone know what or why there are some sys_id's that start with "__ENC__" ?

Examples include the tables pa_favorites and v_private_cache. E.g. sys_id = __ENC__YTg0OGQ5NTM0ZjY1MTI4MGY5ZjhhNDBmMDMxMGM3Nzg=

What's even weirder is that if you do a GlideQuery for the actual sys_id (without the __ENC__), it matches against the normal ID and not the ENC one. To me, that suggests that the sys_id is stored normally in the database, and the application (ServiceNow) does something to it along the way to your computer. Does the ENC mean some sort of encryption?

The only results I could find in Google are issues where those sys_id's have been exposed, such as older problem records and support requests for loosely related issues.

1 ACCEPTED SOLUTION

bernyalvarado
Mega Sage

Hi David,



This is a great question and it's very interesting how you got to it.



It appears to me that any sys id with '_ENC_' is just an internal representation of an identifier for such cases where a sys_id field does not exist in the sys_dictionary table. In other words, to me it's the way ServiceNow is able to continue to handle it's general global system object uniqueness (still leveraging behind the scenes a GUID). That's why when you do a GlideRecord script you're still able to access the record through its sys_id.



A similar question around tables missing a sys_id field on its definition was asked and discussed on the following thread: Re: what is the primary key of a table?



Thanks,


Berny


View solution in original post

9 REPLIES 9

Andrii
Kilo Guru

Usually such sys_ids belong to Database Views


Interesting, if it is a database view, it's not in the list sys_db_view (configurable database views). I wonder if it's a "behind the scenes" database view.


Are you talking about any specific module?