The CreatorCon Call for Content is officially open! Get started here.

Notification from sc_request table

Thomas98
Tera Expert

I need to send a notification from sc_request table if the catalog item is :  Account Request  and Type of user (variable) is delete. 

Catalog item name: Account Request

Type_user : Delete 

How can I achieve this in the notification. 

2 REPLIES 2

Harish KM
Kilo Patron
Kilo Patron

//You can do something like this.

//Not tested

//Get the cat item sysid and variable value . Compare both in Advanced condition on sc_request item table's Notification

 

//getting cat item value from sc_req_item
var req = new GlideRecord('sc_req_item');
req.addQuery('request',current.sys_id); // current is the sc_request
req.addQuery('cat_item','32bcdee61be608147a880fa2cd4bcb8c'); // catitem sysid
req.query();
if (req.next()) {

if(current.variable.variablename== 'Delete '){
answer = true;
}

else

{
answer=false;
}

}

Regards
Harish

Valmar Neves
Tera Contributor

Hi Thomas,

 

P.S (Tested on Roma Release)

Try the sample below:

 

find_real_file.png

 

find_real_file.png

 

find_real_file.png

 

Best Regards,