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
aveforstudy1.3196212890020557Eaveforstudy1.3196212890020557E 

formula field not getting queried in where clause

Hi,

I need an urgent help.

I am trying to write a query with a where clause on a formula field.

But in the debug logs the query is printed with out the where clause.

Because of this, the no of records are going beyon i Lakh.

Any help will he highly appreciated.

 

Thanks.

SamuelDeRyckeSamuelDeRycke

Mind showing us your query and fieldtypes ?  Querying with a formula field filter shouldn't be a problem, so maybe the issue is something else.

 

 

 

aveforstudy1.3196212890020557Eaveforstudy1.3196212890020557E

Hey the problem seams to be different.

Actually the number of records persent in the object is more that 1 lakh, therefore i am getting the following error:

"Non-selective query against large object type"

In the where clause i am using a formula field which is not indexed.

I have replaced this field from formula to text and made it as External Id which is indexed.

All i want to know is will this solve my problem.

 

Thanks

 

SFFSFF

Wherever possible, you want to use indexed fields in your WHERE clauses, and formula fields are by definition not indexed. So this may not solve your problem but it will definitely make it better.

 

Good luck!