gs.getUser().getCompanyID(); gives underdefined output on Incident table after WC upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 03:59 AM
Hi Team ,
We have upgraded our instance to WC , and we noticed that Company field on Incident form auto populating as undefined , in default value this is the code
" javascript: if(current.sys_class_name=='problem')gs.getUser().getCompanyID(); "
what could be the issue here ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 04:22 AM
Hello @soumyadaggula
If you are apply on the incident then its sys_class_name would be incident so according to your condition it will give undefine because it fall into the else condition so in else condition there is no value it give undefine i guess.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 05:08 AM
Try once by replacing from :
" javascript: if(current.sys_class_name=='problem')gs.getUser().getCompanyID(); "
TO
" javascript: if(current.sys_class_name=='incident')gs.getUser().getCompanyID(); "
I hope my answer helps you to resolve your issue, if yes please mark my answer helpful & correct.
thank you
rajesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 05:15 AM
@soumyadaggula According to the documentation it is still a valid method in Washington release. Looks like your reference qualifier is incorrect as it only checks for one table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 06:03 AM
@soumyadaggula Please mark the response an accepted solution if it addressed your question.