• #37392
    Salesforce | Aman Aman #4
    Forcetalks

    How to call Salesforce Apex class using javascript?

    How to call Salesforce Apex class using javascript?

     

    • This topic was modified 4 months ago by Salesforce | Aman Aman.
    • This topic was modified 1 week, 6 days ago by Salesforce | Team Team.
    #37395
    Salesforce | shariq shariq #1
    Forcetalks

    Check the below code.

    Apex Class:

    global class ClassName{

    webService static String methodName(String camName) {

    Campaign cam = new Campaign(name = camName);

    return cam.name;

    }

    }

    Java Script:

    var Campaign = sforce.sObject(“Campaign”);

    var String = sforce.apex.exceute(“ClassName”,”methodName”,{name=”ABC”});

    #37410
    Salesforce | Parul Parul #2
    Forcetalks

    Using Remoting action and action function.

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?