Problem / Solution: Object reference not set to an instance of an object when processing Lifecycle automatic action.

Version 4

    Verified Product Versions

    LANDESK Service Desk 2017.x

    Environment:

    Service Desk 2016.x

    Serivce Desk 2017.x

     

    Error message:

    Object reference not set to an instance of an object

     

    at Touchpaper.Framework.Data.DataObject.IsCollectionObjectNewer(IDataObject existingObject, IDataObject newObject)

    at Touchpaper.Framework.Data.DataObject.FindRequiredObjectInCollection(IList list, IAttributePathFilter filter)

    at Touchpaper.Framework.Data.DataObject.GetPathValue(Object obj, IAttributePath attributePath)

    at Touchpaper.Framework.Data.DataObject.FillActionValue(IDataObject dataObject, IActionValue actionValue)

    at Touchpaper.Framework.Data.DataObject.FillActionValues(IDataObject dataObject, IEnumerable values, Boolean isAutomatic, Boolean isInitialisation)

    at Touchpaper.Framework.Data.DataObject.ExecuteAutomaticFunction(IBusinessFunction function, IAction action)

    at Touchpaper.Framework.Data.DataObject.ExecuteAutomaticAction(IAction action, IList`1 automaticActionsList)

    at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

    at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransitionStep(ITransitionStep step, Object param1, Object param2, Boolean validateOnly, IList`1 automaticActionsList)

    at Touchpaper.Framework.Data.DataObject.ProcessLifecycleTransition(ITransition transition, Object param1, Object param2, Boolean validateOnly)

    at Touchpaper.Framework.Data.DataObjectContext.ProcessLifecycleAction(DataObject dataObject, IBusinessFunction function, Object param1, Object param2, Boolean isAutomatic, Boolean validateOnly)

    at Touchpaper.Framework.Data.DataObjectContext.ProcessBusinessFunction(FunctionInvocation functionInvocation, Boolean isAutomatic, Boolean validateOnly)

    at Touchpaper.Framework.Data.DataObjectContext.ProcessBusinessFunctions()

    at Touchpaper.Framework.Data.DataObjectContext.SaveChanges()

    at Touchpaper.Web.Console.Controllers.ObjectController.SaveInternal(ObjectParameters parameters, Func`3 getObject)

    at Touchpaper.Web.Console.Controllers.ObjectController.Apply()

    at lambda_method(Closure , ControllerBase , Object[] )

    at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)

    at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.b__41()

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)

     

    Problem:

    When running a manual action which is followed by automatic one you receive the above error message.

     

    Cause:

    Verify if you are using any Value Types within your Automatic Action to a Collection of objects.

    Check if you don't have two attribute Creation Date with Persistence Type set up for creation.

    The system is trying to get the last created Assignment object and it is checking the attribute Creation Date (default naming) with Persistence Type for Creation.

    If you have two such attributes on one object - one may not be filled with correct creation date dates

     

     

    Solution / Workaround:

    Check with Query Designer which attribute is filled out with creation dates and delete the one with null values.

    The Value Type will be able to localise the last Assignment created within the collection.