Infor CRM (Formerly Saleslogix) v8.1.3- Strange Behavior with the Account Hierarchy Add-In

 We recently had a customer on version 8.1 update 03 that was having problems with the Account Hierarchy module Customer FX created.

The Account Hierarchy screen displays the Parent/Child relationships that Infor CRM never recreated in the web client.  This is a custom smart part that is launched as a dialog from a button.  We have always been able to simply add the button that launches the custom view using a ShowDialog action.

 

This used to correctly bind the Account Hierarchy popup view to the current Account entity.

What I found with this particular customer, is even though the screen seemed bound to the current Account entity (this.BindingSource.Current did not return null) that Entity was in fact empty of had no Account.Id.  Very strange.

Looking at how the dialog action is rendered onto the deployed user control form I found the code looks like this:  

   
    if (DialogService != null)
    {
        // DialogActionItem
        DialogService.SetSpecs(300, 700, “ViewAccountHierarchy”, string.Empty );
        DialogService.EntityType = typeof(Sage.Entity.Interfaces.IAccount);
    
        DialogService.ShowDialog();
    }

What seemed to fix the problem was explicitly passing in the EntityID to the Dialog using DialogService.EntityID=.  UNfortunately since the Dialog action auto-creates the code deployed to the website, that is not something I could add from there.

The solution?  Change the button click action to a C# Snippet Action Item.  Then in the code snippet add the following equivalent code with the Id correctly passed in.

      Sage.Entity.Interfaces.IAccount acc = this.BindingSource.Current as Sage.Entity.Interfaces.IAccount;
    if (DialogService != null)
    {
        // DialogActionItem
        DialogService.SetSpecs(300, 700, “ViewAccountHierarchy”, string.Empty );
        DialogService.EntityType = typeof(Sage.Entity.Interfaces.IAccount);
        DialogService.EntityID = acc.Id.ToString();
        DialogService.ShowDialog();
    }

Strange but at least there is a work-around.  Onto the next thing….

 

ABOUT THE AUTHOR

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

1 Comment

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!