- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 03:16 AM
Hi @newhand
"getRecord", not supported in scoped app.
please query the sc_req_item table with sysId and get the catalog record.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 03:24 AM
Hi @newhand ,
In scoped application $sp.getRecord will not work you can use below script
var gr = new GlideRecord('sc_req_item');
if(gr.get('ccbaa13c47ea8e10ea269dbe316d43f8')){
gs.info("xxxxx");
}
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 04:14 AM
Hi @newhand
Refer to the below link.
https://serviceportal.io/docs/documentation/widget_server_script_apis.md
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 06:32 PM
@Community Alums @Rajesh Chopade1
Finally , I caught the error with try-catch。
Yes,as the error message says, getRecord is not supported in scoped application。
But according to the official document below,it should be supported in the scoped application。。。
And I also found an OOTB widget in the scoped application using getRecord (I'm not sure if it works...)。
I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 04:50 AM
Hi @newhand
Great!
Then select the answer as correct and helpful and close this open thread.
Thank you