Deleting Records from ServiceNow

FlexNet Manager Suite 2022 R2 (On-Premises)
If an asset or application record exists both in FlexNet Manager Suite and ServiceNow but is then deleted in FlexNet Manager Suite, the records are marked for deletion in ServiceNow during the next export from FlexNet Manager Suite. However, the records are not automatically deleted. To delete the records from ServiceNow, you need to create a Global business rule and include a script with a condition: current.state == 'Succeeded'.

To delete records in ServiceNow using a global business rule:

  1. In ServiceNow, navigate to System Definition, and click Business Rule.
    The Business Rules page appears.
  2. Click New.
  3. Do the following.
    1. In the Name field, enter a name for the rule:
    2. From the Table field, select x_fls_flexera_fnms_import_transaction.
    3. Ensure that the Application field is set to Global.
    4. Select the Active check box.
    5. Select the Advanced check box.
    6. On the Advanced tab, enter the following in the Condition field:
      current.state == 'Succeeded'
    7. On the Advanced tab, enter the following into the Script field:
      var util = new FNMSUtil();
      util.removeIsDeletedRecordsFromTable('cmdb_ci_computer');
      util.removeIsDeletedRecordsFromTable('cmdb_software_instance');
      util.removeIsDeletedRecordsFromTable('cmdb_ci_vm_instance');
      util.removeIsDeletedRecordsFromTable('cmdb_sam_sw_install');
      Note: The last line (util.removeIsDeletedRecordsFromTable('cmdb_sam_sw_install'); should only be included if your setup is using the SAM Foundation plugin.

FlexNet Manager Suite (On-Premises)

2022 R2