Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
I am getting error 'No such column 'AccountNumber' on entity 'Name' when i tried to execute the following query,
select parent.AccountNumber, parentid, subscriberid from
EntitySubscription where parent.type='account'
How to get AccountNumber from this query? Please suggest.
asked Sep 11, 2014 at 16:38
6,7541212 gold badges7171 silver badges139139 bronze badges
You need to use TYPEOF to get at this data (currently only a developer preview). If you need this for production code, use two queries instead of one.
select id, typeof parentid when account then parent.accountnumber end from entitysubscription where parent.type = 'account'
answered Sep 11, 2014 at 16:47
468k1919 gold badges426426 silver badges767767 bronze badges
You must log in to answer this question.
Not the answer you're looking for? Browse other questions tagged