FortiNAC does not allow deleting Custom Scans if they are being used by other features. The following error will appear when trying to delete one.

In some environments, there may be a lot of Scans configured, and checking them one by one to see who uses the Custom Scan will cause a lot of headaches. To check which Scans are in use, see Scans in Use. This option lists all the FortiNAC features that reference this specific Custom Scan and disables it.
 However, the scans in use can also be checked from the CLI by looking at the database tables.  Find the Custom Scan 'ID' and 'supportedProductID' values:
execute db-shell
MariaDB [bsc]> SELECT * FROM EPC_Custom_Product;

Verify if the Scan has attributes or if it is tied to a scan by using the values learned above:Â
MariaDB [bsc]>SELECT (SELECT COUNT(*) FROM EPC_Custom_Product_Attribute WHERE customProductId = 1449276421300253) AS attributes, (SELECT COUNT(*) FROM EPC_Supported_Product WHERE ID = 1422026333667332) AS supported_product_exists, (SELECT COUNT(*) FROM EPC_Scan WHERE ID = 1422026333667332) AS scan_link;
 Conditions:
 Execute deletion:Â
DELETE FROM EPC_Custom_Product WHERE ID = 1449276421300253 LIMIT 1;
 Never delete directly if the attribute's value is higher than 0. Detach first and make sure it shows 0, then delete.  Verify removal:
SELECT *FROM EPC_Custom_Product WHERE ID = 1449276421300253;
Related document: Scans in use |