- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 06:24 AM
When saving a Project record, the record does not save and outputs this error to the console
Uncaught TypeError: Cannot read property 'getAttribute' of undefined
at e.handleResponseForSaveProject [as callbackFunction] (pm_project.do?sys_id=4454f0dddb4777004be522d405961960&sysparm_record_target=pm_project&sysparm_record_row=1&sysparm_record_rows=1&sysparm_record_list=project_manager%3Dfe9d90e2db7884106ad5400e0b96190f^ORDERBYnumber:960)
at e._responseReceived (js_includes_doctype.jsx?v=09-24-2019_1701&lp=Sun_Sep_29_21_14_55_PDT_2019&c=22_594:15338)
at e._processReqChange (js_includes_doctype.jsx?v=09-24-2019_1701&lp=Sun_Sep_29_21_14_55_PDT_2019&c=22_594:15196)
This error does not happen to a user with the admin role and seems like an access issue, but not idea what would cause this.
This appears to occur in the Save button found here
This error is most likely from this line
var message = result.getAttribute("message");
This seems to indicate that an invalid response from the Script Include it calls via AJAX
These same users can create, read, and delete projects but not save.
Any ideas on how to fix this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 09:37 AM
Thank you for the tips. I just figured this out and was caused by an execute ACL on AjaxProjectUtil that has a role restriction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 09:16 AM
Hello,
I don't have the answer on what is faulty, but I can think it could come from a crash of the function in the server side process.
(getMessageForStateChange inside AjaxProjectUtil Script Include)
Here are some tips to help you find out:
Look in the Systems Logs to see if there a javascript error occuring at the time of the save.
If not, add some debugs in the "getMessageForStateChange" function of the "AjaxProjectUtil" Script Include and see if it goes to the end without crashing.
getMessageForStateChange: function() {
[...]
gs.log('SaveProject: still running here', 'AjaxProjectUtil');
[...]
}
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 09:37 AM
Thank you for the tips. I just figured this out and was caused by an execute ACL on AjaxProjectUtil that has a role restriction.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 09:44 AM
krr,
The getAttribute() function should return a string so to test if your theory is right. Do something like this:
var message = resutlt.getAttribute("message") || "There is no 'message' value";
This way the message variable is populated with a value if the getAttribute() function doesn't return anything.
If in fact this function is not returning a value, i would use the ACL debugging tools to see if your non-admins are have access issues.
Using debugging tool:
- make sure to enable this module while you're still Admin
- impersonate non-admin user
- navigate to table and evaluate acl debugging results
See this ACL debugging tools doc for details.