You need to sign in to do that
Don't have an account?
Angela Schloeder
Custom button - OnClick JavaScript
I have a custom button on the Event to open a pdf with info from event and related task notes. I need to recreate it as an OnClick JavaScript, so that if the Event field '"Approved by:" is blank they receive an alert, but I cannot seem to get to right. I have tried several different senarios and keep getting different errors.
{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/36.0/apex.js")}
IF(ISPICKVAL(!Event.Approved_by__c, "NULL")){
alert("Pre Meeting Notes Need to be Approved First");
}
else
{
window.location = 'apex/EventMeetingNotes';
}
{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/36.0/apex.js")}
IF(ISPICKVAL(!Event.Approved_by__c, "NULL")){
alert("Pre Meeting Notes Need to be Approved First");
}
else
{
window.location = 'apex/EventMeetingNotes';
}
you can access Picklist field value by using {!Event.Approved_by__c}
directly
highlighted the chnaged part,Check below is working??
Thanks
D Naveen Rahul.
i hope this button is used in details screen correct ??. and Event.Approved_by__c is in same object right??.
Thanks
D Naveen Rahul.
please create a button and select Behaviour as Execute Javascript. like below
Thanks
Naveen