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
Prasad MPrasad M 

Delete account conditionally through java script button

Hi Their, 

Is there a way to delete account conditionally through javascript button.
If the specified field has the value null it should be deleted else it should alert saying the account cannot be deleted. 

Thanks in advance
srlawr uksrlawr uk
Are you sure you want to go down the route of a new Javascript button? They are not supported in Salesforce LEX, and nearly all of us are spending a lot of time now replacing Javascript buttons with alternative technologies! Such as those found in the Trailhead for removing javascript buttons... https://trailhead.salesforce.com/en/modules/lex_javascript_button_migration