You need to sign in to do that
Don't have an account?
HARSHABK
Alert message for list view custom button
Hi,
I have created a mass update button on custom object using Visualforce. Visualforce page works fine but we need to have alert message (Select the row you want to update) on custom button on the list page.
Can someone guide me through this with sample code as I am new to Visualforce and Javascript.
Thanks
So you create the button in visualforce? In that case you could try something like this.
<apex:actionFunction action="{!someAction}" name="someAction"/>
<apex:commandButton onclick="myFunc();"/>
<script>
function myFunc() {
if (someCondition)
alert("Error has occured");
else
someAction();
}
</script>
I typed this off the top of my head so it won't be a direct translation, but it should get you on your way.