function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VasilShVasilSh 

Is AccountID exist in Case table?

Hello
I am using the SalesForce API 6.0
When I am trying to do the following select

“select * from Case where AccountId ='XXXXX'

I've got the following SalesForce error: INVAID_FIELD

AccountId is correct one becouse I am able to the following select

select * from Contact where AccountId = 'XXXXX'

So I suppose AccountID didn't exist in Case table but

in sforce_office_toolkit.pdf on page 173

I can see Sales Objects diagram where link between Account table and Case table exist via AccountID

Can somebody help ?

Thank you

Vasil

 

Gareth DaviesGareth Davies

Download Sidekick (see link below) it will let you see all the fields on all the objects. And it's free.

G.

VasilShVasilSh
Hello !
Thank you for your answer. Very nice tool.
and how can I see (from this tool) Case table didn't reference with Account table. Exactly what I suppose before so question is:
Is SalesForce documentation wrong ? Because I can see reference between Case and Account table
Thank you
Vasil 
The_FoxThe_Fox
Hello,

If you look through the sforce explorer with API 6.0 you have to go ContactId and then from ContactID got the accountID so a select query more or a retrieve query.

Regards

VasilShVasilSh

Hi

Yes I know it. That what exactly what we are doing now for avoid this problem. The problem is: if we would like to have all Cases relating to one Account  we have to do some amount of selects querys

1. select all Contacts with AccountID

2. For every Contact select Cases with ContactID in cycle

As you can see it take a while to do all this selects waiting answer from SF server and etc, too complex.

Much more simple just to do one select from Case table with AccountID but it is not possible by some reason. I can see link between Account table and Case table in SF documentation but it doesn't exist in reality.

Thank you

Vasil