Skip to main content
Nintex Community Menu Bar
Question

Visualforce Error: System.UnexpectedException: SOQL statements cannot query more than 20 different

  • July 9, 2024
  • 2 replies
  • 12 views

Forum|alt.badge.img+1

New error trying to display/preview a page. This was not happening when I was working on it last Friday. 

2 replies

Forum|alt.badge.img+9

Check out this thread: https://developer.salesforce.com/forums/ForumsMain?id=906F000000090dFIAQ. It seems like you have a model where you’re query is not selective enough. You should use conditions to make the query as efficient and targeted as possible. Do you have a lot of models on the page? What object s are they on? What conditions do you have on the models? If you give some more information I can try to help.


Forum|alt.badge.img+13

Sounds like one of your Models has a lot of Child Relationships in it — do you know if is this true? Did you add additional Child Relationships since last week, or was the page unchanged since last week?