Eine interessante Möglichkeit, eine APEX-Klasse per Custom Button anzusprechen, wird von Shivanath in seinem Artikel " Call Apex Class from custom button (javascript) in Slaesforce " ausführlich erläutert. Klasse: global class MyClass{ webservice static void myMethod() // you can pass parameters{ // Do something } } Custom Button : {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} if({!AAA__c.Name}!=Null){ sforce.apex.execute("MyClass","myMethod",{}"}); alert("This is {!AAA__c.Name}"); }
Auszüge aus Projekten, Beispielcode, Tipps und Tricks aus dem Bereich Salesforce.