Modifying the Edit Name Dialog in the Infor CRM Web Client

The name control in the Infor CRM web client comes with a pop-up edit dialog where you can enter in the suffix, first, middle, and last name, as well as the prefix.

This dialog has the Suffix and Prefix fields tied to the Picklists for “Name Suffix” and “Name Prefix”. However the dialog also has these fields so that users have to type a value that matches an existing entry. If for instance you have to add a contact with a suffix of “Lord Supreme Commander” you are out of luck.

Let’s take a look at how we can modify the name edit dialog.

First get Ryan’s awesome Custom Loader module.

Next we can add a new module in the Modules directory. Our module will extend the standard Infor name control widget of “Sage/UI/Controls/Name”. Using the dojo aspect function we will extend the showDialog function of the base widget. in this code snippet we will change the suffix field to have a custom (empty) on change event, instead of the built in validation that enforces the value matches an item in the list.

the finished code looks like this:

], function (
) {
    aspect.after(name.prototype, 'showDialog', function () {        
        var suff = dijit.byId('ContentPlaceHolderMain_MainContent_ContactDetails_nmeContactName-Suffix-Select');
        suff.onChange = function (e) {
            //console.log('we are no longer doing anything. la la la.');

Boom! there you go!

I should mention this code has the client side control name hard coded, which won’t work for other pages where the name control is not on the main Contact Detail. You can get to the control name using the this.clientId and adding the “-Suffix-Select” to it. So modify as you see fit.

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

Kris Halsrud

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

Submit a Comment

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