Log in as a user without a personnel record linked to it. At the enterprise>accounting view, create a new GL account, save it and close the dialogue. Right-click on the new GL account, select inactivate. The session will crash with the following exception being reported:
" Exception Type: Ivara.PL.Exceptions.PLFatalException
Message: OTFatalException caught at: [?InvokeMethod@MethodInvoker@PL@Ivara@@$$FUE$AAMXPE$AAVMethodInvokerArguments@Data@23@AE$CAPE$AAUIMethodResult@523@@Z,MethodInvoker.cpp,385]
Message: tObjectRef::operator -> returned NULL for ( 0, 0 ) : exception will follow
Stack Trace:
Server stack trace:
at Ivara.Common.Communication.WcfClientMessageInspector.AfterReceiveReply(Message& reply, Object correlationState)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.AfterReceiveReply(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Ivara.PL.Interfaces.IMethodDispatcher.InvokeMethod(MethodInvokerArguments args, IMethodResult& methodResult)
at Ivara.PL.Client.MethodInvoker.InvokeMethod(MethodInvokerArguments args, IMethodResult& result)
at Ivara.Client.Methods.MethodDispatcher.<>c__DisplayClass37_0.<InvokeServerMethod>b__0()
at Ivara.PL.Client.WrapRemoteCalls.Wrap(Action serverCall, KillActivityMethod killActivity, ExceptionMethod reconnect, DisplayErrorAndShutdownMethod displayErrorAndShutdown, ExceptionMethod handleUnknown)"
Reported as a bug in VSTS #14480 - "APM Crashes when GL account is inactivated by a user without an Employee record".
The workaround is to link the user with an employee record then the inactivation can be carried out without issue.