Example 5: Delete a record in an external source

remote-table-script-def-example5.md
Raw file

In this example, we create a script to delete an incident record from the external source.

For Remote Table API information, refer to:

JavaScript
(function executeDelete(v_record) {
     var gr = new GlideRecord('incident');     if (gr.get(v_record.sys_id)) {         gr.deleteRecord();     } else {         v_record.setLastErrorMessage("Record not found");     } })(v_record);

Parent Topic:Create script definitions for a remote table

Search documentation
Search document titles and file paths on the brazil branch