I'm getting an Object Reference Error when I click the Action to "Add Configuration Item" to my Change

Version 2

    Verified Product Versions

    LANDESK Service Desk 7.8.xLANDESK Service Desk 2016.xLANDESK Asset Central 2016.x

    Problem:

    Whenever you click the "Add Configuration Item" action on a Change you will in your pop up window in Web Access get an "Object Reference" Error.

     

    addconfig.png

     

    Reason:

    This happens when you have a Grouping on the Query that you are using as the Default Query on your Configuration Item Object.

    Whenever you use an Action such as "Add Configuration Item" or "Add Child / Parent" you will use the query set as the default query on the Object that this action is linked to.

    If the query added as a default query has a grouping added, this error message will show. This has been logged as problem: 6357 - "When adding to a linking business object you get a "Object reference not set to the instance of an object" if the default query is grouped"

     

    addconfig1.png

     

    The reason someone might want to put a grouping on this Query is to make it easier to find the CI you want to attach, by seeing it grouped by the CI Class Type.

     

    Here is an alternative to having a group on, that will still allow you to filter the list by CI Class Type

     

    Workaround:

    1. Log into Console as SA and go to Object Designer

    2. Expand Configuration Management Module

    3. Drag "Configuration Item Type Reference" Object to "Configuration Item" Object.

    - Answer NO to the pop up question so that you create a []-[] attribute on the Configuration Item Object. ([]-[] Configuration Item Type Reference)

     

    4. On the new "[]-[] Configuration Item Type Reference" Attribute, select to create a Before Save Calculation as follows:

     

    addconfig3.png

     

    Calculation:

    (Dependency will be done automatically, but it should be "Class"

     

    import System

    static def GetAttributeValue(ConfigItem):

       Value = null

       if ConfigItem.Class != null:

          Value = ConfigItem.Class.Title

       return ConfigItem.GetObjectByAttribute("Config.ConfigItemTypeReference", "Title", Value)

     

     

    5. Save Object Designer

    6. Create or launch the Query that you are using as a default query on the Configuration Item Object.

    7. If you are creating a new Query, then you need to set this as the default query on the Configuration item Object.

    - Use criteria: "Configuration Item Type Reference Is Equal To Prompt User"

     

    addconfig4.png

     

    Note: DO NOT add any hard coded Criteria in this Query. Hard Coded Criteria is a none prompted Criteria. This is not supported and will cause issues in the product.

     

    - Add any Attributes as Columns that you want to see when adding your CI to your Change.

    8. Save your Query

     

    Now when you create a new Change and click on the "Add Configuration Item" action, you will see your default query.

    This will have a drop down list where you can select the CI Class Type. Note that this list will ONLY show you CI Class Type which would be preferred rather than seeing Class Types that are not related to CI's.

     

    When you select a CI Class Type in the drop down list, the list of available CI's will filter accordingly.

    You can select CI's and move them over to selected area.

     

    Untitled5.pngUntitled6.png

     

    If you are experiencing Problem: 6357 please log this with your LANDESK Support Provider referencing Problem 6357

     

     

    Note that this Article will be valid for other Objects too, such as if adding a Child to an Incident, you will see the default query added on the Incident Object. If this Query is grouped you will have the same issue. The above is a solution on this situation as well.

     

    What if I already have existing CI's in my system?

    If you are setting this up retrospectively, meaning you already have CI's in the database, the already existing CI's will not show in the list as the Calculation hasn't run on these items.

    To fix this, set the calculation up to run as a scheduled calculation before setting it up as a Before Save Calculation and allow a schedule to run through on all CI's. This will then make sure all your CI's are showing as should when adding Configuration Items to an item.