Infor CRM Web Client Import Lead Bug

Starting in version 8.3.06 the import lead wizard no longer functions in the Infor CRM web client. This is normally accessed from the Tools IMport Leads menu.

When you select this menu you will get a message similar to:

“We’re sorry, you’ve encountered an error. If applicable, please try again”

If you look in the event logs of the web server you will see the following error:

ERROR Sage.Platform.WebPortal.WebPortalPage – The smart part ‘~/SmartParts/Lead/ImportLeadsWizard.ascx’ could not be loaded [Saleslogix Error Id=SLXB243B653D339B2BA]
System.Web.HttpParseException (0x80004005): c:\inetpub\wwwroot\SlxClient\SmartParts\Lead\StepSelectFile.ascx.cs(389): error CS0266: Cannot implicitly convert type ‘long’ to ‘int’. An explicit conversion exists (are you missing a cast?)

If we look at the StepSelectFile.ascx.cs code file we can see the following:

    private byte[] GetData(UploadedFile file)
    {
        int fileLen = file.ContentLength;
        byte[] data = new byte[fileLen];
        file.InputStream.Read(data, 0, fileLen);
        return data;
    }

The line:

int fileLen = file.ContentLength;

Is where the problem is. The file parameter is a Telerik.Web.UI.UploadedFile object. We had updated the Telerik files from the shipped version of Infor CRM. The standard files are from 2011 but those files lack several bug and security fixes.

In the older versions ContentLength returns an int, but in the newer versions ContentLength returns a long datatype.

To fix this we simply have to change that method like this to convert the result to an int:

    private byte[] GetData(UploadedFile file)
    {
        int fileLen = Convert.ToInt32(file.ContentLength);
        byte[] data = new byte[fileLen];
        file.InputStream.Read(data, 0, fileLen);
        return data;
    }
ABOUT THE AUTHOR

Kris Halsrud

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

2 Comments

  1. Hi,
    Can i use a full version of telerik component without any problem with the Infor CRM version ?
    Thank’s

    Reply
    • Yes generally the Telerik components work pretty well within the Infor CRM client.

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) news and product updates!

You have Successfully Subscribed!