While doing a routine upgrade of a third-party add-on for Dynamics AX 4.0 I got the following error:
User ‘____’ is not authorized to insert a record in table ‘SYSSETUPLOG’. Request denied.
The SysSetupLog table, labeled “Installation information,” stores application and kernel version information as well as the status of the System Upgrade Checklist. Therefore it is vital that the AOS service account as well as certain administrators have access to the table. When updating a third-party add-on the version number was changed (a key in that table) thereby triggering the system upgrade checklist. Unfortunately nobody had access to update the checklist items.
Although the cause can not be ascertained this job will allow anyone in the built-in administrators group to update the table.
static void updateAdminGroup_AllowChangeChecklist(Args _args)
{
#Admin
SecurityKeySet securitySet;
UserGroupInfo userGroupInfo;
UserInfo userInfo;
;
setPrefix(funcName());
securitySet = new SecurityKeySet();
securitySet.loadGroupRights(#AdminUserGroup, '');
securitySet.tableAccess(tablenum(SysSetupLog), AccessType::Delete);
securitySet.tableAccess(tablenum(SysSecurityFormTable), AccessType::Delete);
xAccessRightsList::saveSecurityRights(securitySet.pack(), userGroupInfo.id, '');
}
Leave A Comment