We have been using the trigger "Trigger on Email Message " on the link below for more than 2 years without any issues.
http://wiki.developerforce.com/page/Auto-completion_of_Case_Milestones_with_Triggers
Yesterday, I noticed that our sandboxes (even those not in the Spring 14) are returning a query exception.
List<Case> caseList = [Select c.Id, c.ContactId, c.Contact.Email,
c.OwnerId, c.Status,
c.EntitlementId,
c.SlaStartDate, c.SlaExitDate
From Case c where c.Id IN :emCaseIds];
"No such column EntitlementId on entity Case….."
I don't understand why all of the sudden we are seeing this error if it has been working for so long.
If look at the documentation for the case object http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_case.htm#topic-title
There is no such column but it does appear on this diagram as still doesn't explain why it was working before.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_support.htm
Any ideas on what might be happening? A salesforce bug?
Best Answer
If this is occurring in every sandbox, I would suggest checking your profiles, did someone push an update that removed visibility to the field. If it is just the new sandbox, I would check to make sure that Entitlements are enabled. That field is not visible on the case until Entitlement Management is enabled in the org.