+ Start a Discussion
j_panchalj_panchal 

SalesForce API list.

Hello,

 

Are there any APIs that salesforce provide to get list of Companies, Accounts and Contacts that we can use in customController in APEX code.

 

I am a newbie to salesforce development, so please provide the detail or any link about SalesforceAPIs.

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
Janet GuoJanet Guo

Hi j_panchal,

 

So, here's what I understand from your previous post: You would like to display a list of Account and Contact records in your Visualforce page. Is that correct?

 

If that is the case, you don't actually have to write your own Apex controller for that. Salesforce has standard controllers for standard SObjects. So you can just use them directly in your VF page or component.

 

For example, if you wanted to display Account records, your VF page might look something like this:

<apex:page standardController="account"  tabStyle="account" recordSetVar="accounts"  sidebar="false">
	<apex:pageBlock >
		<apex:pageblockTable value="{!accounts}" var="a" >
			<apex:column value="{!a.Name}"/>
			<apex:column value="{!a.Owner}"/>
			<apex:column value="{!a.Description}"/>
			<apex:column value="{!a.Type}"/>
			[Note: continue adding the columns you would like to see]
		</apex:pageblockTable>
	</apex:pageBlock>
</apex:page>

 

Does that help?

Janet

All Answers

Janet GuoJanet Guo

Hi j_panchal,

 

Here's a link to some general information about APIs available for Salesforce. Could you be more specific about what you would like to do? 

 

If you are developing in Apex, I would recommend using the Force.com IDE plugin for Eclipse. When you create a project for a Salesforce org in the IDE, it comes with a Schema for that org that lists every object and its fields' API name as well as some other information (like values for picklists and foreign keys, etc). You can read up on the Force.com IDE here. For some additional tips on installation, follow this link.

 

If you have more specific information on what you would like to do, I might be able to somewhat more helpful.

 

Good luck!

j_panchalj_panchal

Hi Janet,

 

Thanks for the reply.

 

i'm using salesforce developer console for development in APEX. and have to develop a VisulaForce page where i need to display a list of salesforce Accounts with their related Contacts.

So, do we have to use sObjects (i.e. Account, Contact) and then use SOQL queries to get such a list or any other API in salesforce.

 

Thanks again :)

Janet GuoJanet Guo

Hi j_panchal,

 

So, here's what I understand from your previous post: You would like to display a list of Account and Contact records in your Visualforce page. Is that correct?

 

If that is the case, you don't actually have to write your own Apex controller for that. Salesforce has standard controllers for standard SObjects. So you can just use them directly in your VF page or component.

 

For example, if you wanted to display Account records, your VF page might look something like this:

<apex:page standardController="account"  tabStyle="account" recordSetVar="accounts"  sidebar="false">
	<apex:pageBlock >
		<apex:pageblockTable value="{!accounts}" var="a" >
			<apex:column value="{!a.Name}"/>
			<apex:column value="{!a.Owner}"/>
			<apex:column value="{!a.Description}"/>
			<apex:column value="{!a.Type}"/>
			[Note: continue adding the columns you would like to see]
		</apex:pageblockTable>
	</apex:pageBlock>
</apex:page>

 

Does that help?

Janet

This was selected as the best answer
j_panchalj_panchal

it surely helped.. :)

 

Thanks a lot.