How to get the current record in script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:04 AM
We have created a script include and calling it in the UI macro, we are not able to fetch the current record sys I'd .
Does any have any idea about it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:24 AM
You can pass the current record as a parameter and use it in the script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:27 AM
Hello @Anurag Tripathi -
Are you telling to use the current.sys_id in the script include?
I didn't get you can you elaborate a bit more.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:32 AM
Where you are calling the script include, can you pass the record's sys_id as argument?
for eg:
var x = new ScriotIncludeName().functionName('record's sys id or object');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:41 AM
We have glided the table and used a record sys I'd in the addQuery.
We are calling it in ui macro.