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
Yash BhutaniYash Bhutani 

how to restrict user to delete any account if that Account has related contacts or opportunities using visualforce page?

Sai PraveenSai Praveen (Salesforce Developers) 
hi Yash,

You want usin Visual force page. Genereally VF page is used to show some result to user.But here we have to process the record when delete button is onclick. Usually we do this using before delete trigger.

Let me know if that works for you.

Thanks,