Timeline for How to differentiate the batch class based on the different parameters passed and fire different email based on the parameters when batch class fails
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 28, 2022 at 8:06 | answer | added | Phil W | timeline score: 0 | |
| Jul 28, 2022 at 7:12 | comment | added | Sudharsan | Hi @PhilW Thanks for your response. Unfortunately batch is not distinguished by the SObject type. It is distinguished by one of the parameters passed and that parameter is stored as a value in one of the fields of the object. | |
| Jul 28, 2022 at 6:34 | comment | added | Phil W | If your batch is distinguished by the SObject type that it processes, you could simply look at the platform event's JobScope and determine the SObject type by examining the first ID: there are means to take an Id and get the SObjectType from it. | |
| Jul 28, 2022 at 5:41 | comment | added | Sudharsan | Hi @NickCook We are trying to send email notification when batch apex class fails. We tried a platform event triggered flow to send email notification when batch class fails. We are able to receive email when batch class fails for some reason, but the problem we are facing here is we are using the same batch class for both requirements, so we are not able to differentiate for which requirement the batch class is failing. Requirement A: batchInstance = new batchInstance ('Account',dateInstance ); Requirement B: batchInstance = new batchInstance ('Contact',dateInstance ); | |
| Jul 28, 2022 at 5:16 | comment | added | Nick C | What have you tried? What part of it isn't working? Please edit your question to narrow down exactly what part of this you're stuck on. | |
| S Jul 28, 2022 at 4:42 | review | First questions | |||
| Jul 28, 2022 at 5:48 | |||||
| S Jul 28, 2022 at 4:42 | history | asked | Sudharsan | CC BY-SA 4.0 |