Error: Invalid spaceKey on retrieving a related space config.

Deleting assets

If you have assets that are no longer being used, or you are discarding them, such as old hardware, you can delete these assets to ensure that you have an accurate representation of the assets in your IT environment. When you delete an asset from the database, all relationships associated with that asset are also deleted.

Note

If you do not have the Delete permission on the class of an asset, you cannot delete the assets of that class; the Delete toolbar icon for the assets of that class is disabled.

To delete an asset

  1. Click the Remedyforce CMDB tab.
  2. In the left navigation pane of the Remedyforce CMDB tab list view page, select the class whose assets you want to delete.

    Note

    You can view classes and manage configuration items (CIs) and assets of a selected class based on the CI and asset management configurations and the Remedyforce CMDB permissions assigned to you. For more information, see Overview of the Remedyforce CMDB tab.

  3. In the right pane of the Remedyforce CMDB tab list view page, select the asset that you want to delete.

    You can use the Search box to search for assets based on specific keywords. You can also search for assets that contain wildcard characters (such as /, #, $, %, -, and so on). If you select a class in the left navigation pane, only the assets of that class are searched. To search all classes, select the Base Element class in the left navigation pane. You can search for an asset by using data in the Instance ID, Instance Name, Description, Class Name, Asset #, Token ID, and Serial # columns. 
    Alternatively, you can use search Filter  to perform a more precise search that can be based on multiple criteria. For more information, see Overview of the Remedyforce CMDB tab.

  4. Click Delete.

    Note

    If you do not have the Update and Delete CMDB user permission for Asset Management View, the Delete toolbar icon for the assets of a class is disabled. If both CI and asset management are enabled, to be able to delete a CMDB instance of the instance type CI/Asset from the All tab of Remedyforce CMDB, you must have Update and Delete CMDB user permission for both CI Management View and Asset Management View. Otherwise, the Delete toolbar icon is disabled.

  5. In the confirmation dialog box, click Yes

You can delete one or more assets from the Base Element object of the CMDB by using Salesforce Object Query Language (SOQL) query, Salesforce page layout, the data loader, or the Pentaho Data Integration tool. When you delete an asset, the asset relationships, client links, and tasks links are also deleted.

Deleting a CI and asset record

When both CI and IT asset management are enabled, if you select a CI/Asset instance and click Delete, the following delete options are available based on your CMDB user permissions and the tab that you have selected on the left navigation pane of the Remedyforce CMDB tab:

Tab on the left navigation paneAvailable delete options
CI
  • If you have Update and Delete permission for both CI Management View and Asset Management View, you are prompted to select Delete from Assets and retain CI elementDelete from CIs and retain Asset element, or Delete from Assets and CIs. By default, Delete from CIs and retain Asset element is selected. If you select Delete from Assets and CIs, the record is permanently deleted from the Remedyforce CMDB.
  • If you have Update and Delete permission for CI Management View, and a permission other than Update and Delete for Asset Management View, you are prompted to select Delete from Assets and retain CI elementDelete from CIs and retain Asset element, or Delete from Assets and CIs. However, only the Delete from CIs and retain Asset element option is enabled.
  • If you have a permission other than Update and Delete for CI Management View,  and any permission for Asset Management View, the Delete toolbar icon is disabled.
Asset
  • If you have Update and Delete permission for both CI Management View and Asset Management View, you are prompted to select Delete from Assets and retain CI elementDelete from CIs and retain Asset element, or Delete from Assets and CIs. By default, Delete from Assets and retain CI element is selected. If you select Delete from Assets and CIs, the record is permanently deleted from the Remedyforce CMDB.
  • If you have Update and Delete permission for Asset Management View and a permission other than Update and Delete for CI Management View, you are prompted to select Delete from Assets and retain CI elementDelete from CIs and retain Asset element, or Delete from Assets and CIs. However, only the Delete from Assets and retain CI element option is enabled.
  • If you have a permission other than Update and Delete for Asset Management View, and any permission for CI Management View, the Delete toolbar icon is disabled.
All
  • If you have Update and Delete permission for both CI Management View and Asset Management View, you are prompted to select Delete from Assets and retain CI elementDelete from CIs and retain Asset element, or Delete from Assets and CIs. By default, Delete from Assets and CIs is selected, which permanently deletes the record from the Remedyforce CMDB.
  • If you have Update and Delete permission for Asset Management View and a permission other than Update and Delete for CI Management View, you are prompted to select Delete from Assets and retain CI elementDelete from CIs and retain Asset element, or Delete from Assets and CIs. However, only the Delete from Assets and retain CI element option is enabled.
  • If you have Update and Delete permission for CI Management View and a permission other than Update and Delete for Asset Management View, you are prompted to select Delete from Assets and retain CI elementDelete from CIs and retain Asset element, or Delete from Assets and CIs. However, only the Delete from CIs and retain Asset element option is enabled.

To delete assets by using the Developer Console

  1. Navigate to the Developer Console.
  2. Click the text box next to the Execute button.
  3. Enter a script to delete the assets. BMC recommends that the batch size for the query should be 50.
    • Example: To delete assets from a specific asset class, use the following script:

      Delete [Select ID From BMCServiceDesk__BMC_BaseElement__c where BMCServiceDesk__class__c ='BMC_Tablet' Limit 50]
    • Example: To delete assets that are marked to be deleted from a specific asset class, use the following script:

      Delete [Select ID From BMCServiceDesk__BMC_BaseElement__c where BMCServiceDesk__class__c ='BMC_Tablet' AND BMCServiceDesk__MarkAsDeleted__c =TRUE Limit 50]
    • Example: To permanently delete the records from a CI, asset, or CI and Asset class, use the following script:

      List<BMCServiceDesk__BMC_BaseElement__c> BEList = [select Id from BMCServiceDesk__BMC_BaseElement__c where BMCServiceDesk__class__c = 'BMC_IPEndpoint' Limit 50];
      delete BEList;

    • Example: To delete records only from a Rule Based Asset class, and not from the CI class on which that Rule Based Asset class is based:

      List< BMCServiceDesk__BMC_BaseElement__c> BEList = [select Id, BMCServiceDesk__DeleteStatusCode__c from BMCServiceDesk__BMC_BaseElement__c where BMCServiceDesk__FKAssetRuleClass__r. BMCServiceDesk__ClassName__c = 'BMC_Desktop'/'BMC_Router' Limit 50];
      for(BMCServiceDesk__BMC_BaseElement__c inst : BEList){
      inst. BMCServiceDesk__DeleteStatusCode__c = 1;
      update BEList;

    • Example: To delete only assets from a CI and Asset class:

      List< BMCServiceDesk__BMC_BaseElement__c> BEList = [select Id, BMCServiceDesk__DeleteStatusCode__c from BMCServiceDesk__BMC_BaseElement__c where BMCServiceDesk__FKAssetRuleClass__r. BMCServiceDesk__ClassName__c = 'BMC_Monitor' Limit 50];
      for(BMCServiceDesk__BMC_BaseElement__c inst : BEList){
      inst. BMCServiceDesk__DeleteStatusCode__c = 1;
      update BEList;

  4. Click Execute.
Was this page helpful? Yes No Submitting... Thank you

Comments