When any new Sandbox is created, all Users will see a DML error on the homepage due the User not being attached to a Staff record. The following Article will guide you through running a Script to insert a Staff record, and attach that new Staff record to the Admin User (using the User ID).
1. Login to Sandbox as the Admin User. See also: How To - Login to Sandbox
2. Open the Developer Console (click on Username in upper-right corner, then click Developer Console).
3. From the Debug menu, select “Open Execute Anonymous Window”
4. In the Window, paste the following Script.
i360__Staff__c staff = new i360__Staff__c();
staff.Name = UserInfo.getName();
staff.i360__User__c = UserInfo.getUserId();
insert staff;
5. When the Script is correct, click Execute.
6. In the Logs below, you should see Success.
7. Run the First Time Setup tool.
8. Double-check by going to the Staff Tab. You should now see the Staff record inserted via the script.
You can also insert a Staff member for a specific User.
1. Go to the Admin User (Setup>Manage Users>Users>click on Admin User)
2. Copy the Admin User’s ID (see screen shot below)
NOTE: Replace the highlighted text with the desired Staff Name and the actual System Administrator User ID.
i360__Staff__c staff = new i360__Staff__c();
staff.Name = 'System Administrator';
staff.i360__User__c = '00536000001EhNc';
insert staff;
3. When the Script is correct, click Execute.
4. In the Logs below, you should see Success.
5. Double-check by going to the Staff Tab. You should now see the Staff record inserted via the script.
Additional Resources
Alternate script that generates staff record without needing ID:
i360__Staff__c staff = new i360__Staff__c();
staff.Name = UserInfo.getName();
staff.i360__User__c = UserInfo.getUserId();
insert staff;
Also copy/pastable script from above screenshot:
i360__Staff__c staff = new i360__Staff__c();
staff.Name = '<NAME>';
staff.i360__User__c = '<UserID>';
insert staff;
Cause
There is no staff record attached to the User.