Newer Version Available

This content describes an older version of this product. View Latest

Examples of Synchronous Calls

Data Call Examples

login Example:

query Example:

queryMore Example:

queryAll Example:

Relationship Query Example—Child to Parent:

Relationship name formats differ depending on the direction of the relationship (parent-to-child or child-to-parent), and also depending on whether the objects are standard or custom objects. For more information, see Relationship Queries in the Salesforce SOQL and SOSL Reference Guide at www.salesforce.com/us/developer/docs/soql_sosl/index.htm.

Note

Relationship Query Example—Parent to Child:

create Example:

Batch create Example:

delete Example:

merge Example:

process Example:

update Example:

undelete Example:

upsert Example:

retrieve Example:

search Example:

getDeleted Example:

getUpdated Example:

convertLead Example:

Describe Examples

describeSObject Account Example:

describeSObjects Example:

describeGlobal Example:

describeLayout Example:

describeTabs Example:

Utility Examples

getServerTimestamp Example:

getUserInfo Example:

resetPassword and setPassword Example:

sendEmail Example:

The following sample shows best practice techniques by putting all processing in a function that does not execute until the HTML page is loaded.