You need to sign in to do that
Don't have an account?
DaveKemp
Can I access parent Account info from a Case before Insert trigger?
Hi,
I have a trigger that updates a Case's BusinessHours field based on the Country of the Account, if I update the Business Hours field in an After Insert trigger, then the field is updated but the Milestones (which are created on Insert) refer to the default Business Hours, not unreasonably!
Is it possible to get the country field from the parent Account in a Before Insert Trigger, if so, how would I do that?
Many thanks,
David
I have a trigger that updates a Case's BusinessHours field based on the Country of the Account, if I update the Business Hours field in an After Insert trigger, then the field is updated but the Milestones (which are created on Insert) refer to the default Business Hours, not unreasonably!
Is it possible to get the country field from the parent Account in a Before Insert Trigger, if so, how would I do that?
Many thanks,
David
All Answers
Thanks for that, as ever, I found something similar just after posting the question...
I'm updating the Business Hours based on the relevant Business Hours Id, but the Milestones don't seem to be using the correct Business Hours, am I missing something?
All the above seems to indicate that it will use the Japanese Business Hours, but it's still setting the Milestones (Target Date) using the Default Business Hours
can you please paste the full code or the query for bh.
Thanks