Timeline for Not Serializable: com/salesforce/api/fast/List$$lcom/salesforce/api/Messaging/SingleEmailMessage$$r
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 17, 2018 at 1:13 | comment | added | cropredy |
N.B. this error can also occur if the non-transient property references objects in other classes that in turn reference the Messaging class. A recent example for me was referencing a variable of type fflib_ISobjectUnitOfWork from the Trailhead UnitOfWork pattern that in turn has deep within its concrete class a reference to the Message class.
|
|
Nov 23, 2016 at 19:19 | history | edited | Adrian Larson♦ | CC BY-SA 3.0 |
added 15 characters in body
|
Nov 23, 2016 at 17:29 | comment | added | Dan Jones | You're right actually, I'm not. Thanks for that. I'm not entirely sure why I made it a controller property to begin with! | |
Nov 23, 2016 at 17:24 | comment | added | Adrian Larson♦ |
You don't really need to add it as a controller property at all, though. You don't seem to reference it anywhere outside your sendEmail method.
|
|
Nov 23, 2016 at 17:23 | comment | added | Dan Jones |
Incidentally, I hadn't realised until you said I wasn't referencing public List<Messaging.SingleEmailMessage> messageList , so marked it as private also. Without knowing more about this, I'm not sure if this helps with this particular problem, but if nothing else it'll make a bit more "secure".
|
|
Nov 23, 2016 at 17:22 | history | edited | Adrian Larson♦ | CC BY-SA 3.0 |
deleted 63 characters in body
|
Nov 23, 2016 at 17:21 | comment | added | Dan Jones |
Thanks Adrian, worked like a charm as answers normally do from yourself! I really need to look into transient and viewstates as I'm woefully under-informed on them.
|
|
Nov 23, 2016 at 17:20 | history | edited | Adrian Larson♦ | CC BY-SA 3.0 |
deleted 12 characters in body
|
Nov 23, 2016 at 17:18 | vote | accept | Dan Jones | ||
Nov 23, 2016 at 17:13 | history | answered | Adrian Larson♦ | CC BY-SA 3.0 |