This is a discussion on Check account set up for Department within the Salesforce PHP Tutorials forums, part of the Salesforce category; Which table we have to look for checking a department account have
-
Check account set up for Department
Which table we have to look for checking a department account have been setup or not in salesforce.
I am using SOQL PHP.
Can you please help me

Thanks
Zod!
-
Zod I am taking a guess here but I would think that you would be querying the Account object to see if you have any accounts that have been created with a certain type of department
-
Hey Thank you Mike.
SELECT Id, Name, BillingCity FROM Account is working.
Do you know what will be field name for sap #.
Is it possible to find the table structure .(desc) ??
select * from tablename is also not working ??
Do you any alternatives. please
-
Well there are numerous ways that you could get the field name.
You could login to your Salesforce org and go to setup > customize > Accounts > fields. You should see the field name there and it will give you the API name which you can query in your code. You can also use the data loader and you will see the fields there, if you login > pick extract and it will give you a list of objects you can query, then choose the account object and on the next screen, you will see the fields.
The API and PHP can use a a method called describeObject and describeGlobal to get the information that you are looking for. I have a script that does that and I can post it tomorrow, if you are interested.
The easiest way is to follow the first direction that I just posted above
~Mike
-
Hey , That was quick and great reply.
I follow the first way-> setup->customize>accounts.
That works.
Thank You
-
Your welcome man! Anytime!!
-
Another great tool for viewing Salesforce objects and testing SOQL queries (if you are running Windows) is the Sforce/Apex Explorer. You can get it here: Apex Explorer - developer.force.com
-
Hey fisher
That tool looks nice.
But I cant login.
"login requires security token appended to password"
What is that token?
-

Originally Posted by
zodiacfive
Hey fisher
That tool looks nice.
But I cant login.
"login requires security token appended to password"
What is that token?
If you go to setup > My Personal Information > reset your security token
Once you do that, it will be emailed to you
Hope that helps and sorry for the delay
~Mike
-
The token is a pain in the butt... they rolled it out with their new security model and it relies on cookies.
Essentially, if you login from an IP that isn't recognized as having been accessed by you a year prior to their security change, it will ask you to authenticate yourself with a "two-factor" authentication aka their security token.
Once you follow the steps that Mike outlined, you will need to enter that token into every application you have for salesforce whether that be the GUI login, API login, Outlook tool, etc.
Your login details will be:
username@email.com
password<token>
Now for the fun part, if you then go to a cafe or any place that gives you a new IP to access salesforce, you will need to activate again and all previous items set with the old token are lost so you must use the new token again across all applications. Oh and if you set your computer to clear cookies in any way, you will have to get a new token every time that disappears as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Bookmarks