back to top

Saleslogix v9.1 Sales Library Functional Security Inconsistency

In the Saleslogix web client’s Sales Library screen we have seen inconsistent application of the functional security that control the visibility to the add, edit, and delete buttons on the screen. This functional security is based on secured actions granted to the user through the normal role access.

This screen is a dojo widget implemented in the Sage/Library/Manager.js file. Inside this file is a method called _CreateView. This method creates the folder tree, the file grid, and the two toolbars that sit above those two controls. Its code looks like this:

_createView: function () {
    this._createTreeViewToolbar();
    this._createTreeView();
    this._createGridToolbar();
    this._createGrid();
}

In the two toolbar methods _createTreeViewToolbar and _createGridToolbar, they each use a supporting library. For the _createGridToolbar method this is the Sage/Library/FileHandler.js. For the _createTreeViewToolbar it uses Sage/Library/FolderHandler.js.

Inside both of these supporting classes is an object called “can” with boolean properties for “add”,”edit”, and “delete”. These properties are set in these libraries within a method called “_initSecurity”. This method uses secured actions to determine which rights are set, as shown here:

_initSecurity: function () {
    this.can.add = this._roles.hasAccess('Entities/LibraryDirs/Add');
    this.can.edit = this._roles.hasAccess('Entities/LibraryDirs/Edit');
    this.can['delete'] = this._roles.hasAccess('Entities/LibraryDirs/Delete');
    this.can.manage = (this._roles.hasAccess('Administration/Manage/Library') || this._roles.hasAccess('Administration/View'));
}

What I have found is that this can object is not correctly getting set with the properties as corresponding to the current user’s secured action permissions. I believe this is caused from the “_initSecurity” method not being properly called.

To fix this what we want to do is to ensure the _initSecurity method is called before the calls to _createTreeViewToolbar and _createGridToolbar in the Manager.js file.

To implement this what we need to do is add a pre-action to the _createTreeViewToolbar and _createGridToolbar in the Manager.js file. Within the pre-action we then make sure to call the supporting library’s _initSecurity method. We can do this using the following code:

define([    
    'dojo/aspect'    
],
    function (aspect) {

        if (!Sage|| !Sage.Library || !Sage.Library.Manager) return;        
        aspect.before(Sage.Library.Manager, '_createGridToolbar', function () {
            Sage.Library.FileHandler._initSecurity();
            console.log('FileHandler');
            console.log(Sage.Library.FileHandler.can);
        });
        aspect.before(Sage.Library.Manager, '_createTreeViewToolbar', function () {
            Sage.Library.FolderHandler._initSecurity();
            console.log('FolderHandler');
            console.log(Sage.Library.FolderHandler.can);
        });
    }
);

Please note that the if check that returns out of the function is necessary if you are loading this code globally. This is because the Sage.Library.Manager is only instantiated on the Library page. If you were to add this code to other pages without that if statement, all other pages would fail to load.

You can also see in the code I am outputting the values of the can objects to the browser console. This is not required, but is useful to ensure that the property values are being set based on the secure action permissions granted to the user.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Kris Halsrud
Kris Halsrud
Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos