Home Asset Management

How to change the Displayname of Asset Management enumeration list values

Bart_LevingBart_Leving Customer IT Monkey ✭

Hi,

From our business I got the request to change the Displaynames of the License Type enumeration list values in the Cireson Asset Management Pack, without removing the excisting data linked to the excisting license data.

For the Cireson Asset Management Pack there are lists in SCSM that I can edit, but not for this field type.

For one of our own custom MP's I would make the change in the code of the Classes file, but for Asset Management I don't have that option.

How can I change the display names of this enumeration list without breaking the existing link with the license data?

Best Answers

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer ✓

    Hi Bart

    You need to create a DisplayString for that Enum value in your own Management Pack.

    Open the Asset Management MP, find the DisplayStrings for these and then copy that XML to a new MP called something like:

    Custom.AssetManagement.LicenceTypeEnum.Overrides

    Geoff

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer ✓

    Hi Bart,

    You need to reference the original enum in the CAM MP via the alias. I've sorted it below and attached.

    Also, this is fine to change the Display Name of the two OOB values, but not to add your additional (Other). This would break the build in Asset Workflows because it has to be one or the other. Permanent or Temporary.

    <ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Custom.AssetManagement.LicenceTypeEnum.Overrides</ID>
          <Version>1.0.0.0</Version>
        </Identity>
        <Name>Custom.AssetManagement.LicenceTypeEnum.Overrides</Name>
        <References>
          <Reference Alias="CiresonAssetManagement">
            <ID>CiresonAssetManagement</ID>
            <Version>8.5.0.0</Version>
            <PublicKeyToken>98ba2176e2a9efbc</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Custom.AssetManagement.LicenceTypeEnum.Overrides">
              <Name>Custom - Asset Management - Licence Type Enum - Overrides</Name>
            </DisplayString>
            <DisplayString ElementID="CiresonAssetManagement!Cireson.AssetManagement.LicenceTypeEnum.Temporary">
              <Name>Test</Name>
            </DisplayString>
            <DisplayString ElementID="CiresonAssetManagement!Cireson.AssetManagement.LicenceTypeEnum.Permanent">
              <Name>Perm</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack> 
    

    Geoff

Answers

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer ✓

    Hi Bart

    You need to create a DisplayString for that Enum value in your own Management Pack.

    Open the Asset Management MP, find the DisplayStrings for these and then copy that XML to a new MP called something like:

    Custom.AssetManagement.LicenceTypeEnum.Overrides

    Geoff

  • Bart_LevingBart_Leving Customer IT Monkey ✭

    Thank you, I will make the adaptation like that.

  • Bart_LevingBart_Leving Customer IT Monkey ✭

    Hi Geoff,

    I made that change in an custom MP, and the change shows as a new enumeration list with a different ID then the original one. Is there a way to prevent this and have the same ID?

    Or should I change all the forms and/or presentation to point to the new Enum?


  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Bart,

    You don't want the Enumeration part of the custom MP - just the DisplayString part which could point to the original Enum in the CAM MP.

    Can you share the XML of your MP?

    Geoff

  • Bart_LevingBart_Leving Customer IT Monkey ✭
    edited March 29

    Hi Geoff,

    I have removed the Enumeration part of the custom MP and replaced the MP in SCSM, but this does not make a difference.

    My custom MP now contains:

    <ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Custom.AssetManagement.LicenceTypeEnum.Overrides</ID>
          <Version>1.0.0.1</Version>
        </Identity>
        <Name>Custom.AssetManagement.LicenceTypeEnum.Overrides</Name>
        <References>
          <Reference Alias="CiresonAssetManagement">
            <ID>CiresonAssetManagement</ID>
            <Version>8.5.1.2016</Version>
            <PublicKeyToken>98ba2176e2a9efbc</PublicKeyToken>
          </Reference>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>7.5.8501.1</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Cireson.AssetManagement.LicenceTypeEnum.Temporary">
              <Name>Test</Name>
            </DisplayString>
            <DisplayString ElementID="Cireson.AssetManagement.LicenceTypeEnum.Permanent">
              <Name>Perm</Name>
            </DisplayString>
            <DisplayString ElementID="Cireson.AssetManagement.LicenceTypeEnum.Other">
              <Name>Other</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>
    

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer ✓

    Hi Bart,

    You need to reference the original enum in the CAM MP via the alias. I've sorted it below and attached.

    Also, this is fine to change the Display Name of the two OOB values, but not to add your additional (Other). This would break the build in Asset Workflows because it has to be one or the other. Permanent or Temporary.

    <ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Custom.AssetManagement.LicenceTypeEnum.Overrides</ID>
          <Version>1.0.0.0</Version>
        </Identity>
        <Name>Custom.AssetManagement.LicenceTypeEnum.Overrides</Name>
        <References>
          <Reference Alias="CiresonAssetManagement">
            <ID>CiresonAssetManagement</ID>
            <Version>8.5.0.0</Version>
            <PublicKeyToken>98ba2176e2a9efbc</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Custom.AssetManagement.LicenceTypeEnum.Overrides">
              <Name>Custom - Asset Management - Licence Type Enum - Overrides</Name>
            </DisplayString>
            <DisplayString ElementID="CiresonAssetManagement!Cireson.AssetManagement.LicenceTypeEnum.Temporary">
              <Name>Test</Name>
            </DisplayString>
            <DisplayString ElementID="CiresonAssetManagement!Cireson.AssetManagement.LicenceTypeEnum.Permanent">
              <Name>Perm</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack> 
    

    Geoff

  • Bart_LevingBart_Leving Customer IT Monkey ✭

    Hi Geoff,

    Thank you for the assistence, I made the changes and this works for me.

Sign In or Register to comment.