You need to sign in to do that
Don't have an account?
Giancarlo Amati
case milestone apex doesn't work with email-to-case
Hi All,
I have enabled Email-to-case in my org and wanted to test the code for the case trigger that automatically creates a case milestone under the case, as per this LINK (https://help.salesforce.com/s/articleView?id=sf.entitlements_auto_add.htm&type=5).
When Email-to-case is enabled, any case is created by email, is created in SFDC by e2c, and the trigger is created BEFORE e2c has finished populating the fields on the case record. That makes it impossible to retrieve the entitlement from the account or the contact.
SFDC Support captured the logs with me and they confirmed that this should not be the expected behavior.
Has anyone found a different solution?
Thank you,
]GC
I have enabled Email-to-case in my org and wanted to test the code for the case trigger that automatically creates a case milestone under the case, as per this LINK (https://help.salesforce.com/s/articleView?id=sf.entitlements_auto_add.htm&type=5).
When Email-to-case is enabled, any case is created by email, is created in SFDC by e2c, and the trigger is created BEFORE e2c has finished populating the fields on the case record. That makes it impossible to retrieve the entitlement from the account or the contact.
SFDC Support captured the logs with me and they confirmed that this should not be the expected behavior.
Has anyone found a different solution?
Thank you,
]GC
I understand that you have logged a support case. Can you post the solution that worked for you?
Thanks.