I want to call the current table and sysid of the current record from Business rule to script Include

Maradani Revat1
Tera Contributor

Hi,

 

I want to call current.sys_id from business rule to script include instead of doing gliderecord and getting the sysid. Please let me know how can I get this.

 

Thanks,

Revathi

1 ACCEPTED SOLUTION

Kamil Surtel
Mega Guru

Hi Maradani!

 

You can pass the sys id from a business rule to a script include as a parameter.

For Example:

var sysId = current.sys_id
var result = new nameOfTheScriptInclude().nameOfTheMethodInScriptInclude(sysId);

This way you won't have to use GlideRecord in your script include.

Hope this helps!

View solution in original post

2 REPLIES 2

suvro
Mega Sage
Mega Sage

pass the current object to the script include

Use current.getUniqueValue(); 

currrent.getTableName(); 

in the script include

Kamil Surtel
Mega Guru

Hi Maradani!

 

You can pass the sys id from a business rule to a script include as a parameter.

For Example:

var sysId = current.sys_id
var result = new nameOfTheScriptInclude().nameOfTheMethodInScriptInclude(sysId);

This way you won't have to use GlideRecord in your script include.

Hope this helps!