function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ThathulaThathula 

Why do i get two error statements in my pageMessages

Hi all,

I've a Trigger and in that Trigger i've used addError method.
Everything is fine except i get two error statements like below, All i need is first line, i don't need second one..
Any suggestions?Please fill in Welcome Kit/ E-ID mailing address information
GT_taskCreation: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id a2nf000000075GmAAI; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please fill in Welcome Kit/ E-ID mailing address information: [] Trigger.GT_taskCreation: line 464, column 1 Trigger.GT_taskCreation: line 128, column 1
Thank you very much

User-added image
cvuyyurucvuyyuru
Can you share your VF code, Apex Class and Trigger code.

 
surasura
this issue occur normaly when you catch the exception  and explictly set it' s message as the pageMessage via apex code. remove the code that explictly set the exception message as page message
ThathulaThathula
I did override save() and finally now it works fine, Thanks all :)