How invoke APEX method from custom button

Published on

Add following java script codes to, custom button’s javaScript ‘onClick’ section. {!REQUIRESCRIPT(“/soap/ajax/15.0/connection.js”)} {!REQUIRESCRIPT(“/soap/ajax/15.0/apex.js”)} //Get Opportunity id var opId= “{!Opportunity.Id}”; //Call insertJob method by passing that Opportunity id sforce.apex.execute(“JobService”,”insertJob”,{op_id:opId}); //Redirect to that tab window.location = ‘https://ap1.salesforce.com/a0G/o’; Note: Thank you very much for Adam & Jeremy Ross for their guide, those are very much helpful to me. … Continue reading How invoke APEX method from custom button

Salesforce REST API Login?

Published on

Sample Java code that uses Username-Password OAuth flow: public class AccountQuery { // The connection data private static final String query = “SELECT Name, Idfrom Account”; private static final String clientId = “theID”; private static final String clientSecret = “theSecret”; // THis is meaningless in our context private static final String redirectUri = “https://localhost:8443/_callback”; private … Continue reading Salesforce REST API Login?

python salesforce library to get salesforce data

Published on

Use beatbox Example to query for a lead by email address import beatbox sf_username = “Username” sf_password = “password” sf_api_token = “api token” def get_lead_records_by_email(email) sf_client = beatbox.PythonClient() password = str(“%s%s” % (sf_password, sf_api_token)) sf_client.login(sf_username, password) lead_qry = “SELECT id, Email, FirstName, LastName, OwnerId FROM Lead WHERE Email = ‘%s'” % (email) records = sf_client.query(lead_qry) … Continue reading python salesforce library to get salesforce data

How to export contacts from Salesforce

Published on

If you are a Salesforce user, you can export all data (contacts, accounts, notes, etc) or only specific types (i.e. only contacts, only accounts, only notes etc). To export your contacts, tasks, appointments, and notes from Salesforce follow the steps below: 1. Login to Salesforce. 2. Click Setup. 3. Expand Data Management and click Data Export (on the left). 4. Click … Continue reading How to export contacts from Salesforce