Adding a Custom Asset Type

FlexNet Manager Suite 2023 R2 (On-Premises)
Custom asset types are not supported in the same way as customizable drop-down lists. Adding a custom asset type requires action directly on the compliance database (as described below), and is subject to the following limitations:
  • You cannot declare a completely custom layout for the property sheet of your custom asset type. If your new asset type is "managed" (that is, may be linked to an inventory device record), it takes the property sheet for the Laptop asset type as its template for properties layout. On the other hand, if the new asset type is not managed (that is, it's an inert object such as a chair or desk from which software/hardware inventory cannot be collected), it takes the property sheet layout for a Cell phone as its template for the property sheet.
  • If you have previously added custom properties to either of the above default templates, these customizations are not inherited by the property sheet for your new asset types.
  • Existing factory-supplied properties on the default property sheet cannot be moved (relocated) nor removed for your new asset type. However, you can add additional custom properties to the property sheet for your new asset type, using the standard processes described in Custom Properties and its following topics.
  • You cannot control the asset type ID (AssetTypeID) assigned to your new custom asset type. IDs are automatically assigned, starting from 1001 and incrementing with each additional new asset type.
  • You cannot reuse either an existing asset type name (AssetTypeName) or an existing resource name for localization of the asset type name (AssetTypeResourceName). If you successfully created a new asset type with these duplicates, in operation the factory-supplied items of the same names would dominate, and your custom types may be inaccessible. To avoid this, it is best practice to use a name space unique to your enterprise when declaring the @AssetTypeResourceName attribute.
You may use either of the following database processes to declare your new asset type, depending on how often you may wish to create new asset types. These processes are typically implemented by a database administrator, so you may need to request a database change (depending on your internal company processes).

To create custom asset types:

  1. If you are likely to create several new types of assets, you may declare (or replace) a stored procedure to simplify the process for repeated use. This script to create the stored procedure should be executed against the FlexNet Manager Suite compliance database (suggested name FNMSCompliance):
    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'dbo.CustomCreateAssetType') 
    AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
            DROP PROCEDURE dbo.CustomCreateAssetType
    GO
    
    CREATE PROCEDURE dbo.CustomCreateAssetType
            @AssetTypeName NVARCHAR(128)
            , @AssetTypeResourceName NVARCHAR(256)
            , @ManagedType BIT = 0
    AS
    -- Example usage:
    -- EXEC dbo.CustomCreateAssetType 'IT Device', 'MyOrgAssetType.ITDevice'
    
    PRINT 'Configuring asset type "' + @AssetTypeName + '"'
    
    EXEC dbo.ComplianceTranslationPutByResourceStringCultureTypeResourceValue 
            @AssetTypeResourceName, 'en-US', @AssetTypeName
    
    INSERT INTO 
        dbo.AssetType(AssetTypeName, AssetTypeResourceName, ManagedType, BitwiseValue, XMLFile)
    SELECT  @AssetTypeName, @AssetTypeResourceName, @ManagedType, 
        (SELECT MAX(BitwiseValue) FROM AssetType) * 2, NULL
    WHERE NOT EXISTS(
        SELECT 1 FROM dbo.AssetType at WHERE at.AssetTypeResourceName = @AssetTypeResourceName)
    
    GO
    For discussion about attributes, see below.
  2. For one-time use, in Microsoft SQL Studio, execute the following SQL statements against the FlexNet Manager Suite compliance database (suggested name FNMSCompliance):
    declare @AssetTypeResourceName nvarchar(512) = 'MyOrgAssetType.ITDevice'
    declare @AssetTypeName nvarchar(128) = 'IT Device'
    declare @ManagedType bit = 0
    declare @BitwiseValue int
    select @BitwiseValue = 2 * MAX(bitwisevalue) from AssetType
    EXEC dbo.ComplianceTranslationPutByResourceStringCultureTypeResourceValue 
            @AssetTypeResourceName, 'en-US', @AssetTypeName
    insert into AssetType(AssetTypeResourceName, AssetTypeName,ManagedType, BitwiseValue) 
         values (@AssetTypeResourceName, @AssetTypeName, @ManagedType,  @BitwiseValue)
For more details about the attributes (and the columns they will populate), please see FlexNet Manager Suite Schema Reference. The following notes may assist:
  • Best practice is to create an enterprise-specific name space for the @AssetTypeResourceName. This ensures that there cannot be collisions with any existing resource name. It is similarly best practice not to reuse an existing asset type name in a custom definition. For example, if you set up app tracking on smart phones, and therefore want to link cell phone asset records to the incoming inventory device records, you need a custom asset type that has @ManagedType = 1. For this new type, you should not re-use the existing name Cell phone, but create a new asset type such as Smart phone (or better yet, MyOrg Smart phone).
  • @ManagedType is a Boolean which is either:
    • Zero (0) if assets of the new type are not to be linked to inventory device records
    • One (1) if assets of the new type are to be linked to inventory device records.
  • @BitwiseValue must be unique for each asset type, and is used for historical tracking of changes to assets that are linked to an inventory device record. It is mandatory, and must be derived as shown in the code examples above.
  • ComplianceTranslationPutByResourceStringCultureTypeResourceValue is a factory-supplied stored procedure that saves the @AssetTypeResourceName into the list of keys saved in ComplianceResourceString (if it is not already there), and also inserts (or updates) the appropriate row in the ResourceStringCultureType table. The latter identifies the culture type (as a row in the ComplianceCultureType table), and the value of the localized string for (in this case) the asset type name. (If the localized string has not been saved in this way, the default name for the asset type, as saved in the AssetType table, is used at every appearance.)
Note: MSPs should note that the AssetType table does not support multiple tenants. Any new asset type created is instantly available to all tenants.

FlexNet Manager Suite (On-Premises)

2023 R2