jamest23
7/24/2017 - 12:56 AM

ServiceNow code snippets.js

ServiceNow code snippets.js

Visible to: Everyone
Type: List
Table: Variable Ownership [sc_item_option_mtom]
Group By: Parent Item
 
Columns:
- Parent Item
- Parent Item.Request.Requested For
- Dependent Item.Order
- Dependent Item.Question
- Dependent Item.Value
- Created
 
Filter and Order
- Parent Item.Item is <your item>
- Dependent Item.Value is not empty
var ctask = new GlideRecord('sys_attachment');
ctask.addQuery('table_sys_id', '7b8093384f08cf8097093faf0310c7ec');
ctask.addQuery('file_name', 'LibraryServiceSetup.pdf');
ctask.query();

if(ctask.next()){
	ctask.deleteRecord();
}
// inside javascript
new delegateclosetasks().allowdelegate();

// client callable
//--

// inside Conditions: 
new delegateclosetasks().allowdelegate();