- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:34 PM
Hi Team,
I have a clarification that am putting forth to our expert snow family.
So, i have a Business rule and am calling a Script Include from BR.
Will current.sys_id work on SI for further usage without even passing the current object to BR on the function call.
Note - I did this, and seems to be working fine, i passed current.sys_id , on the SI function, say callingSI(current.sys_id).
Now on SI , i have it like this callingSI(){
//still accessing current.sys_id
var gr=new GlideRecord('talename');
gr.addQuery('sys_id',current.sys_id);
---
---
}
Will this work.
Thanks,
Iniya
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 01:10 PM
Hello Inya,
Since you are calling SI from BR, the SI instantiated in the BR itself and hence current will be available in the SI.
Mark the comment as a correct answer and helpful if it answers your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:36 PM
Yes, you can use current object in script include.
your code will work.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 01:02 PM
Hello Inya,
Yes,
It will work. You can use the current objects in Script Include.
- When you pass it in a function call previously instantiating the class it is a part of.
-When you use Script Include as a function call without the class wrapper. You can then reference it as current, without having to pass it in.
hope that will help you.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response useful to you and help others to find information faster.
Thanks,
Tejas

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 01:10 PM
Hello Inya,
Since you are calling SI from BR, the SI instantiated in the BR itself and hence current will be available in the SI.
Mark the comment as a correct answer and helpful if it answers your question.