Error message "Cannot read property 'apply' of undefined"Issue A custom UI Action is not working as expected. When the UI Action is script is executed, this error is shown in the browser console: Uncaught TypeError: Cannot read property 'apply' of undefinedCauseThis occurs when you have the following statement in your code: var gr = GlideRecord("<tablename>"); eg. var gr = GlideRecord("sys_user"); This is a malformed statement.ResolutionIt is necessary to use the new operator to create an instance of the GlideRecord before it can be used successfully from custom scripts. Modify the statement to use the new operator: var gr = new GlideRecord("<tablename>"); eg. var gr = new GlideRecord("sys_user");Related LinksJavascript new operatorGlideRecord Client Side API