Skip to content

newapplesho/salesforce-smalltalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

salesforce-smalltalk Build Status

Salesforce API Library for Pharo Smalltalk

Supported Smalltalk Versions

Pharo Smalltalk 5.0, 6.0

Installation

Metacello new
    baseline: 'Salesforce';
    repository: 'github:https://newapplesho/salesforce-smalltalk/pharo-repository';
    load.

Setup

SFSettings initialize.
SFSettings default.
SFSettings default username: '<Your mailaddress>'.
"You must append the user’s security token to their password A security token is an automatically-generated key from Salesforce."
SFSettings default password: '<Your password><Security token>'.
"Sandbox"
SFSettings default isSandbox: true.

Authentication

SFClient new login.

Simple Query

client := SFClient new.
client query: 'SELECT name FROM Account'.

Account and Contact Information

accessor := SFAccessor new.

accessor allAccounts: { 'Id'. 'Name' }.
accessor allContacts: { 'Id'. 'Email' }.

accessor allContacts: { 'Id'. 'Email' }  withAccount: { 'Id'. 'Name' }.
accessor allAccounts: { 'Id'. 'Name'. } withContacts: { 'Id'. 'Email' }.

CRUD

Delete

accessor := SFAccessor new.
accessor deleteObject: '<Salesforce Object Id>' model: SFLead. 

About

Salesforce API Library for Pharo Smalltalk

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published