You need to sign in to do that
Don't have an account?
Mark Serloreti
Apex trigger error when sending E-Mail
Hello Community,
I am the marketing and business developer of a German iP Law Company. After our developer left, I was given the task to maintain our SF enterprise platform.
I turn to you with the following problem, that I encounter whenever I try to set a new task or send an e-mail. I assume that the error comes from a project that was started long before I joined the company, and was never really resolved and is now sitting there crippling our SF. Since I want to use SF for marketing campaigns, it is vital to me to have a working e-mail solution.
This is the error message:
Apex script unhandled trigger exception by user/organization: 005Dxxxxxx/00Dxxxxxxx
onTask: execution of AfterInsert
caused by: System.NullPointerException: Argument cannot be null.
Class.System.EncodingUtil.urlDecode: line 25, column 1
Class.TaskHandlers.AfterInsertHandler.handle: line 58, column 1
Class.Triggers.manage: line 58, column 1
Trigger.onTask: line 9, column 1
This is the on-screen error message:
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger onTask caused an unexpected exception, contact your administrator: onTask: execution of AfterInsert
caused by: System.NullPointerException: Argument cannot be null.: Class.System.EncodingUtil.urlDecode: line 25, column 1
This is what I believe is the offending code:
trigger onTask on Task(after delete, after insert, after undelete,
after update, before delete, before insert, before update) {
new Triggers()
.bind(Triggers.Evt.afterinsert, new TaskHandlers.AfterInsertHandler())
.bind(Triggers.Evt.afterupdate, new TaskHandlers.AfterUpdateHandler())
.bind(Triggers.Evt.beforeupdate, new TaskHandlers.BeforeUpdateHandler())
.bind(Triggers.Evt.afterdelete, new TaskHandlers.AfterDeleteHandler())
.manage();
}
SF support team suggested that I might post this error to the community, hoping to get help. I am not a developer, but I have experience in HTML5, JS, CSS3 and PHP.
Any help is highly appreciated! Thank you very much!
best regards,
Mark
I am the marketing and business developer of a German iP Law Company. After our developer left, I was given the task to maintain our SF enterprise platform.
I turn to you with the following problem, that I encounter whenever I try to set a new task or send an e-mail. I assume that the error comes from a project that was started long before I joined the company, and was never really resolved and is now sitting there crippling our SF. Since I want to use SF for marketing campaigns, it is vital to me to have a working e-mail solution.
This is the error message:
Apex script unhandled trigger exception by user/organization: 005Dxxxxxx/00Dxxxxxxx
onTask: execution of AfterInsert
caused by: System.NullPointerException: Argument cannot be null.
Class.System.EncodingUtil.urlDecode: line 25, column 1
Class.TaskHandlers.AfterInsertHandler.handle: line 58, column 1
Class.Triggers.manage: line 58, column 1
Trigger.onTask: line 9, column 1
This is the on-screen error message:
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger onTask caused an unexpected exception, contact your administrator: onTask: execution of AfterInsert
caused by: System.NullPointerException: Argument cannot be null.: Class.System.EncodingUtil.urlDecode: line 25, column 1
This is what I believe is the offending code:
trigger onTask on Task(after delete, after insert, after undelete,
after update, before delete, before insert, before update) {
new Triggers()
.bind(Triggers.Evt.afterinsert, new TaskHandlers.AfterInsertHandler())
.bind(Triggers.Evt.afterupdate, new TaskHandlers.AfterUpdateHandler())
.bind(Triggers.Evt.beforeupdate, new TaskHandlers.BeforeUpdateHandler())
.bind(Triggers.Evt.afterdelete, new TaskHandlers.AfterDeleteHandler())
.manage();
}
SF support team suggested that I might post this error to the community, hoping to get help. I am not a developer, but I have experience in HTML5, JS, CSS3 and PHP.
Any help is highly appreciated! Thank you very much!
best regards,
Mark
Can you share the TaskHandlers class to further debug the issue?
Best regards,
Mark
if(t.DocumentIds__c ! = null){
for(String idStr : EncodingUtil.urlDecode(t.DocumentIds__c, 'UTF-8').split(';')) { if (idStr instanceof Id) { checkboxIds.add(Id.valueOf(idStr)); lastId = idStr; } }
}