Hello everyone,
Unfortunately I have to debug an issue that occurs in an instance of IWS 8.1.
I have a custom command that is configured to execute before BundleClose / Close like this:
[code]commandManager.InsertCommandToChainOfCommandBefore("BundleClose", "Close", new List<CommandActivator>
{
new CommandActivator
{
CommandType = typeof(BundleCloseCommand),
Name = "BundleCloseCommand"
}
});[/code]
Everything is great, this gets executed but in that custom command I have a piece of code that suddenly (from something like 2-3 weeks ago) started to generate a NullReferenceException. While doing the debugging I realized that the issue is coming from this piece:
[code]
IInteractionsBundle bundle = parameters["CommandParameter"] as IInteractionsBundle;
IInteraction mainInteraction = bundle.MainInteraction;
string id = mainInteraction.EntrepriseInteractionCurrent.Id;
[/code]
The last line is the one that throws the exception and it seems that in my case EnterpriseInteractionCurrent is null and I have no idea why.
Please, is there someone who can point me in any kind of direction or give me a hint?
I don't know if it counts or not, but it seems that the maineInteraction is actually a IInteractionPullPreview (Genesyslab.Desktop.Modules.Outbound.Model.Interactions).
Thank you very much.