- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 11:15 AM
Hi Brian,
Dot-walking doesn't work with getReference since the client side only fetches the value that specific record has. it has no clue what values the dot-walked field has. This is one of the reasons ServiceNow doesn't recommend using it anymore. I think you will need a good old GlideAjax call here.
LinkedIn & Twitter
Subscribe to my YouTube Channel
Buy The Witch Doctor's Guide To ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 11:20 AM
But I can dot walk to the sys_class_name without issue otherwise my alert would never get called. I have check other CIs that do not have that class and the alert does not appear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 11:28 AM
I think I read it to fast, what you do isn't "dot-walk". Since Dot-walk usually means that you go to another record. Like if I have a incident record as current I can type current.caller_id and I'm not dot-walking, but current.caller_id.email is. Since then I need to go into the caller record to get the email address. The caller_id value is on incident.
But your problem seems strange. if you use getDisplayValue, does that work?
LinkedIn & Twitter
Subscribe to my YouTube Channel
Buy The Witch Doctor's Guide To ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 11:35 AM
Where exactly do you want me to try getDisplayValue? I notice when I try to search for incidents with the u_service_level = 3 I get the following in the encoded query so I'm not sure if there is special scripting I have to do for this or it will not work.
cmdb_ci.ref_u_cmdb_ci_myclass.u_service_level=3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 11:38 AM
Ahh that is probably the reason, you are using getReference on a field that is reference to the cmdb_ci table. And the field you want to get isn't on that table, but on an extended table. That means that when you query the record from cmdb_ci, you won't get back that field, only the field that exist in the cmdb_ci table.
LinkedIn & Twitter
Subscribe to my YouTube Channel
Buy The Witch Doctor's Guide To ServiceNow