You need to sign in to do that
Don't have an account?
testerforce
Automatically Associate Entitlement to Case
I'm looking for some Sample APEX that would, upon Case creation, do a lookup to the Contacts Account and find the Entitlement Associated to the Account. In my case, there will only ever be one Entitlement associated to an Account so the results would return one record. I need this entitlement to be automatically associated to the Case and automatically kick off. Essentially, when a case is created, I need the entitlement to kick off immediately. Does anyone have any sample APEX I can look at that might point me in the right direction.
I found this code in the Cook book. I haven't tested or deployed it yet cause I am trying to add more functionality before I deploy it.
I am trying to use this code and it is not working for me on Email to case. Does anyone know if there is something wrong with it?
This trigger looks exactly like what I have been searching for. However, I have never used Apex before so need some help to implement it.. I created a trigger in Force IDE and uploaded it to my developer org. I have understood that I need a test class to implement it in my production org, can someone give an example of what a test class would look like for this trigger?
The code works for me for email to case
Can you provide the test code used to unit test this code, so you could move it to production?
If you're using this trigger and have different Business Hours on different Entitlements, watch out!
When a Case is created, it's created with your organization's specified default Business Hours.
As per http://eu1.salesforce.com/help/doc/en/entitlements_fields.htm, a Case's Business Hours override an Entitlement's Business Hours. This seems totally braindead, but there it is in black and white.
This means that unless you modify this trigger to also set the Case Business Hours to the Business Hours specified on the Entitlement you're applying, your system will calculate Milestones based on the wrong Business Hours.
It's a real howler, and nearly cost us in Service Credits with our customer!