Extending the Infor CRM 8.4 Web Client Email Control

In a previous post I discussed how to extend the Email control in the Infor CRM web client to change the validation regex string that is used. In 8.4 this functionality changed and now no longer uses the same approach as before. Instead the email validation has changed to being contained within the Sage.Utility library. To change the validation for the email control now you need to override the function emailAddressRegEx. An example of how to do that is using code like so:

define( [    
    'dojo/_base/lang',
    'Sage/UI/Controls/Email',
    'Sage/Utility',
    'dojo/aspect'
],
    function (lang, email, utility, aspect) {       

        aspect.around(Sage.Utility, 'emailAddressRegEx', function () {            
            return function () {
                return "(.*)"; //some valid regex string.  This allows any input
            }
        });
});
ABOUT THE AUTHOR

Kris Halsrud

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

Submit a Comment

Your email address will not be published.

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!