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
David Jenkins 31David Jenkins 31 

SOQL For live accounts

Think my Google skills have failed today!

I'm trying to write a C# app to access the Rest API and I have the following SOQL, It gives me all accounts as expected.
 
SELECT id FROM Account

Now I want only live accounts, however, the following isn't working, am I missing something?
 
SELECT id FROM Account WHERE Status = 'Live'

Cheers for any assistance!

 
Best Answer chosen by David Jenkins 31
Khan AnasKhan Anas (Salesforce Developers) 
Hi David,

Greetings to you!

It seems to me that Status is a custom field. Please use __c with Status.
Try this:
SELECT id FROM Account WHERE Status__c = 'Live'

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi David,

Greetings to you!

It seems to me that Status is a custom field. Please use __c with Status.
Try this:
SELECT id FROM Account WHERE Status__c = 'Live'

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
Manoj ojhaManoj ojha
Due to this kind of platform, we get to learn something. You have explained well.
If any body interested in stock marketing or share marketing (https://www.connectmoney.in/calculator/zerodha-margin-calculator/121/" target="_blank) then he can get a lot of information from here.
Thanks