Be sure that you get consumer key/secret pair by registering remote application in Salesforce, with callback URL to "https://spreadsheets.google.com/macros". Then set them as proper script properties of Google Spreadsheet.
Run "queryDataFromSalesforce" function from script editor.
Subscribe to:
Post Comments (Atom)
6 comments:
Shinichi,
Thanks for putting this together. It seems like this script require a 2-Legged OAuth Token. How would I modify it to make use of 3-Legged OAuth in SF?
Thanks,
Saqib
Thanks for share..
I have a problem...It shows a error "Unexpected error" on that line
"var result = UrlFetchApp.fetch(sessionLoginUrl, options);"
What may be problem ?
The instructions should clarify which Salesforce Editions the code can interact with.
Most people may not be familiar with API calls; where the API calls are only valid for Salesforce Enterprise + Unlimited editions.
For clarification on editions, see http://www.sfdcstatic.com/assets/pdf/datasheets/DS_SalesCloud_EdCompare.pdf
--
Otto
http://www.ottograjeda.com
BTW:
The code does work for the developer edition of Salesforce aka Force.com;
users can register for a free developer account at this link to test the
OAuth code (it works!).
http://www.developerforce.com/events/regular/registration.php
--
Otto
http://www.ottograjeda.com
Could not make it work with a multiple objects. I am trying to get fields from Account and Account owners (user object). Nothing wrong with the query. But I get 'unknown' for attributes from user object. Any idea?
Could not make it work with a multiple objects. I am trying to get fields from Account and Account owners (user object). Nothing wrong with the query. But I get 'unknown' for attributes from user object. Any idea?
Post a Comment