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

Case button to provide alert user



I have managed to get a button onto the record edit page via a hack using 'home page components'. (see below)

Currently, this opens an external page.


I need this button to validate a field (e.g. Checkbox__c = true) and then alert the user if the checkbox is ticked or not.

Does anyone know how I'd achieve that?


<script type="text/javascript">
var url = window.location.href;
window.onload = function () {
if(url.indexOf('/500')!=-1 && url.indexOf('/e')!=-1) 	
	document.getElementById('topButtonRow').innerHTML = 
					document.getElementById('topButtonRow').innerHTML + 
					'<a class="btn" style="padding: 4px 3px;margin: 0 2px;text-decoration: none;" target="_blank" href=""></a>';


 I want to stay away from VF as there are multiple record types etc.


Thanks :-)