function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KD123456KD123456 

What happens when a case is being created

Hi,

 

I have enabled Email to case and have tried to write an after insert trigger that will allow me to send a notification email to the case owner with any of the attachments that the case came with but the trigger failed in execution because the case was not created and thus i was not able to select the attachment for that case.

 

I then tried to use the email services and code the email to case functionality, i first insert the details in Case object and after the insert statement try to use the Owner Id and I find out not matter what the Id is not populated and the record does not get created.

 

Any help in showing how the case is created and what are the sequence of items that goes into the transaction of creating a case.

 

Thanks

KD

skodisanaskodisana

Hi,

 

Is there any reason why you are not using Workflow for this?

 

Thanks,

Kodisana

KD123456KD123456

Email templates does not allow me to include Attachments that are part of the case. Thus I had to have a work around for that.

That is when I find it tricky when the case was not created till all the related events for the case was completed including a after insert or a after update trigger.

 

I would really like to know what are the steps in the process when a case is created using Email to Case option. 

When does a after insert trigger execute, when does a after update trigger execute etc...

 

Thanks

KD