I have an Entitlement process and support triggers that I would like to test so that I can submit code into product.
Problem:
When I create all the object through code I only get one of the Milestones out of three that I am expecting (First Response).
When I take the code out of test so that I can see what object are created I get the same result. However when I create a case manually using the objects created from the code (out of test) I get the three Milestones that I am expecting to be created for the case.
The two Milestones I am not seeing have a Start Time of "Entitlement Process", they are:
Restore SLA Case Priority equals Critical (1) AND Restore Point equals null
and
Resolve SLA Case Priority equals Critical (1) AND Closed not equal to True
(and the above with Priority High, Medium/Low).
Finding that if I let the "Priority" default (to low) I am seeing the Milestones I expect.
I am using the following to set Priority:
newCase.Priority = 'Critical (4)';
In the case created from code it is setting the priority correctly but not setting up Milestones as it should.
