Fix for Setting the Title on Detail Views When Navigating from SpeedSearch Results in the Infor CRM Mobile Client

I had never noticed before until a client brought it up, but in the Infor CRM Mobile client, if you navigate to an account, then do a SpeedSearch search and select a different account, the top title of the detail view will show the previously selected account, not the one you just selected from the SpeedSearch results. This isn’t just the case with accounts, but any entity you’ve previously visited and then select that same entity type from the SpeedSearch results. The detail view will still show the previous record’s title (account name, etc).

The reason this is the case is because the SpeedSearch list view in mobile doesn’t pass a descriptor, or title, for the detail view when it opens it. The SpeedSearch view works a little differently than other list views. It actually set’s the result’s descriptor to be the entity type for that specific result. So for an account, it will set that result row’s descriptor to be “Account” instead of something like “Abbott Worldwide”. However, one side-effect of records returned by SpeedSearch is that the descriptor is already prefixed with the entity type, so “Abbott Worldwide” is actually returned with a descriptor of “Account: Abbott Worldwide”. To fix this, we are going to change the SpeedSearchList to use the result’s descriptor, then we’ll split the value so we end up with the result’s type *and* actual descriptor value. Then we can pass that descriptor to the view and all will display correctly.

The following ApplicationModule will fix this issue:

define('Mobile/Custom/ApplicationModule', [
], function (
) {
    return declare('Mobile.Custom.ApplicationModule', argos.ApplicationModule, {
        loadCustomizations: function () {

            // extend the SpeedSearchList to change it to use the
            // entity's actual descriptor value
            lang.extend(crm.Views.SpeedSearchList, {
                // override the getItemDescriptor
                getItemDescriptor: function getItemDescriptor(entry) {
                    return entry.$descriptor;
                // override it's navigateToDetailView so we can split the 
                // descriptor to use both it's type (to get the correct detail view) 
                // and it's descriptor (to pass to the detail view)
                navigateToDetailView: function navigateToDetailView(key, type) {
                    var descriptor;
                    var parts = type.split(':');
                    type = parts[0];
                    if (parts.length < 2) {
                        descriptor = type;
                    } else if (parts.length == 2) {
                        descriptor = parts[1].trim();
                    } else {
                        // in case the actual name/descriptor also contained a 
                        // colon we will put it all back together
                        var newParts = parts.slice(1, parts.length);
                        descriptor = newParts.join(':').trim();
                    // now navigate to detail view and pass descriptor 
                    var view = App.getView(type.toLowerCase()  + '_detail');
                    if (view) {
                            key: key,
                            descriptor: descriptor

Now everything will appear correctly when navigating from the SpeedSearchList to the detail views.

Want content like this delivered to your inbox? Sign up for our newsletter!

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

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