You need to sign in to do that
Don't have an account?

Error: Invalid Data. Review all error messages below to correct your data. Apex trigger CheckEligiblityUponSelfSchedule caused an unexpected exception
Upon saving a lead record I get this error message:
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger CheckEligiblityUponSelfSchedule caused an unexpected exception, contact your administrator: CheckEligiblityUponSelfSchedule: execution of AfterUpdate caused by: System.FinalException: Record is read-only: Trigger.CheckEligiblityUponSelfSchedule: line 4, column 1
Any ideas?
Here is my code:
Trigger CheckEligiblityUponSelfSchedule on Lead (after update) { for(Lead l: Trigger.new) { if(l.self_scheduled__c = TRUE){ Eligibility.runEligibilityCheck(l.id); } } }
Please check below code in if you have to use == for comparison.
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For Project Support: varaprasad4sfdc@gmail.com