You need to sign in to do that
Don't have an account?
chantspel
Call controller function from custom button
Hi,
I'm trying to add a custom button to the standard button panel on a custom object. This is the view brought up by the <apex:detail> tag. When I select a custom button, it gives me several options including Execute Javascript, url, visualforce page. How can I use it to call a function for THIS visual force page? Any ideas?
Figure this out, this is the bit I needed to fix the issue:
All Answers
In javascript you can call apex class methods
sforce.apex.execute("ClassName","Methodname",{parameter1:"{!Account.Type__c}",Parameter2:"{!Account.Sub_Type__c}", parameter3:"{!Account.Id}"}); window.location.reload();
OK thanks, I did this and now I'm getting this error:
faultcode:'sf:INVALID_SESSION_ID', faultstring:'INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session'
My method takes no arguments and returns void. Is there something I need to pass along to get a session ID?
Figure this out, this is the bit I needed to fix the issue: