Play Games

Search This Blog

Tuesday, December 1, 2015

SOQL query in On Click Javascript Salesforce

Code:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
var qr =
    sforce.connection.query('SELECT Id,name FROM Account WHERE Id = \'{!Account.Id}\'');
var rec = qr.getArray('records');

alert(rec);

Output:

No comments:

Post a Comment