
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:40 AM
Hi,
I'm trying to call a REST message from a Scheduled script:
Executing the script I've got this error:
"Cannot find default value for object."
Any idea?
Many thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 03:38 AM
Hi,
seems issue with the execute method
check docs link below
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:54 AM
Hi,
Did you try check what error came in logs?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 02:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 02:17 AM
Hi,
I would recommend to test the rest message first and check what it expects?
Did you give the proper endpoint to that rest message GET method?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 02:20 AM
removing try catch got this:
org.mozilla.javascript.EcmaError: Cannot find default value for object.
Caused by error in <refname> at line 3
1: function printLog2() {
2: var r = sn_ws.RESTMessageV2('x_414554_nozomiapp.nozomi', 'get_assets');
==> 3: var response = r.execute();
4: gs.info('REST message');
5: }
6: printLog2();
I'm checking right now the REST message.