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
Karuna Batch137Karuna Batch137 

Send email to owner checkbox disabling in VF page

We are using a Visualforce page while converting the Lead.
We don't want to send a notification to the owner with the checkbox Send notification to the owner, so we wanted to take it out of the checkbox or make it read-only, but I am getting this error:
Cannot set property sendNotificationEmail to NULL
Error is in expression '{!convertLead}' in component <apex:commandButton> in page leadconvertpage: Class.leadConvertController.convertLead: line 131, column 1

An unexpected error has occurred. Your development organization has been notified.
Here is the screenshot:
User-added image
We want to send this email notification via workflow rule with a different email template.
Please check and let me know how can I take out the checkbox from the VF page.
Thanks
Aditi Singh 41Aditi Singh 41
Hi,
Can you elaborate how this email is getting triggered. Have you written any email trigger in controller class of this VF page.
AbhinavAbhinav (Salesforce Developers) 
Please share the relevant code so that community can help you better.

Thanks!