Description of Issue:
Internal
In case the Day Code does not work to access the companies in an install, the access can be restored by editing the data.
Resolution:
The user and role that is used when using the day code are not available in editing users or roles so the fix needs to be done using SQL scripts to update the records.
If a company is not available using the day code, someone has disabled the access by either making the user inactive or removing the role that the user needs to gain access. You can use the scripts below to restore the Day Code access to the company.
--- Check to see if user exists. ---select * from SY_Users where User_Id =2--- Backup table---select * into SY_Users_Backup123456 from SY_Users--- update to Active if set as inactive ---update SY_Usersset Inactive ='N'where User_Id =2--- Check for Administration User Group ---select * from SY_User_Group where User_Group_Id =2--- Backup table ---select * into SY_Users_Group_backup123456 from SY_User_Group---If user group record does not exist insert record.---SET IDENTITY_INSERT SY_User_Group OnINSERT INTO SY_User_Group(User_Group_Code ,Description, Inactive, Add_Level, Max_Credit)VALUES(2,'Administration','Administration','N',3,0.00)SET IDENTITY_INSERT SY_User_Group Off--- Check to see if the user_ID has the correct role for Administration should have User_Group_ID of 2 ---select * from SY_User_Group_Join where user_id =2--- Backup table ---select * into SY_User_Group_Join_Backup123456 from SY_User_Group_Join--- Add the group join record if it does not exist for the Day Code user ---INSERT INTO [dbo].[SY_User_Group_Join]([User_Id],[User_Group_Id])VALUES(2,2)