Robert Feenstra, working for Atlanticasset, has informed me about an issue that he had when he created a new appointment. He did not only tell me his issue, he also was able to give the solution! To be able to help more people, here is the error and the solution.
When trying to create a new appointment, upon save get the error:
The record that you are requesting is currently unavailable. Either the record was not found or you do not have sufficient security permissions to view it.
Upon clicking "Ok", I get the error:
General failure in scheduling engine
with a "Ignore and Save" buttonwhich will save the appointment, but still marks the appointment as having a General failure in scheduling engine from then on.
This is caused by an orphan record in the database. To find out which one it is, run the following script against the MSCRM database.
select r.ResourceId, r.OrganizationId, r.BusinessUnitId, r.Name, u.FullName from Resource as r left outer join SystemUserBase as u on r.ResourceId = u.SystemUserId where r.ObjectTypeCode = 8
If the 4th and 5th columns do not match, this CRM user record has been deleted from the SystemUserBase table, then we need to remove the orphan record from the Resoursebase table. To do so, please run the following script.
delete from ResourceBase where ResourceId in (select r.ResourceId from Resource as r left outer join SystemUserBase as u on r.ResourceId = u.SystemUserId where r.ObjectTypeCode = 8 and u.FullName is null)
That should solve the issue. Ofcourse you should always make a backup before trying these kind of actions!
Thanks Robert for sharing!