- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
11-26-2012 01:27 AM
I'm trying to find a way how I can get the full sObject from SF via API.
- using retrieve() you need to specify the filds which you need to be retrieved bu I will like to get them ALL.
- using search() ... there is no ID fields.
Can someone advice me pls how I can solve this issue?
THX in advance.
Solved! Go to Solution.
12-07-2012 08:40 AM - edited 12-07-2012 08:43 AM
Here is an example of how you can get all of the fields in an object and create a SOQL query. (Sorry, the example is in Java).
You could create a query and pass the result into a sObject like so:
String SOQL = "select ... from Account where ...";
QueryResult queryResult = sfdcBinding.query(SOQL);
if (queryResult.size > 0)
sObject Account = queryResult.records;
Hope this helps.
12-09-2012 11:38 PM
THX a lot mcintyrej for your reply.
Your solution is interesting but is almost the same result as from retrieve(). You need to specify all fields, as * will not work in select.