Timeline for Split a List into smaller lists before publishing platform events
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 25, 2020 at 10:40 | comment | added | POZ | Some other questions: 1) what key/value types are in you map? 2) do you need the map values in your output (you're not using them in your example)? I suggest that you edit your question to add those info. | |
Feb 25, 2020 at 2:12 | answer | added | cropredy | timeline score: 0 | |
Feb 24, 2020 at 22:03 | answer | added | POZ | timeline score: 1 | |
Feb 24, 2020 at 21:59 | comment | added | POZ | Thanks for the clarification. | |
Feb 24, 2020 at 21:50 | history | edited | Ravi Teja | CC BY-SA 4.0 |
deleted 96 characters in body
|
Feb 24, 2020 at 21:46 | comment | added | Ravi Teja | That's correct. Here is how the existing logic written. If the incoming opportunities count is 50 the update happens synchronously(no PE). if the count is more than 50 we use trigger to catch the PEs and update opportunities asynchronously. Now for the asynchronous update, if the count is more than 600 let's say 1200 we have to split it into two lists each having 600 opportunities and process two lists 1 at a time using PE. Let me know if this helps you understand or else I can share you the logic. | |
Feb 24, 2020 at 21:32 | comment | added | POZ | I'm sorry but I don't get it. Here's what I understood, please correct me if that's not it. Your external system uses REST or SOAP to call a custom Apex endpoint. The endpoint publishes the PEs (code shown in your question). Then, you use a trigger to catch the PEs and update opportunities? | |
Feb 24, 2020 at 17:30 | comment | added | Ravi Teja | Yes we're integrating with external systems. external system hits salesforce end point which contains opportunities in the request body. optyIdTWrapObjMap contains opportunityId has key and some other fields as pair(in a wrapper class). SFDC validates these opptys and updates them. we're using platform events only when the incoming request body has more number of opportunities | |
Feb 24, 2020 at 13:10 | comment | added | POZ | May I ask why you chose Platform Events? Publishing and subscribing within the platform like you're doing (Apex pub/sub) may be an anti-pattern depending on your use case. PEs are great when you leverage their capabilities: integration with external systems, broadcast to multiple subscribers, leveraging PUSH technology to build realtime UIs... If you're not doing any of that, you might be better off with some batchable Apex. | |
Feb 24, 2020 at 12:56 | answer | added | Abhijith E | timeline score: 0 | |
Feb 24, 2020 at 7:34 | answer | added | gs650x | timeline score: 0 | |
Feb 24, 2020 at 7:34 | history | edited | Ravi Teja | CC BY-SA 4.0 |
deleted 60 characters in body
|
Feb 24, 2020 at 7:24 | history | asked | Ravi Teja | CC BY-SA 4.0 |