• S Kumar.ax1063
  • NEWBIE
  • 0 Points
  • Member since 2011
  • Deloitte

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

Hi,

 

I am getting "Non-selective query against large object type" warning whenever this query is run and try to update account.

 

Here is my code.

 

List<Account> acc =[select id,name,phone from account where name=:l.company and billingstreet=:l.street limit 1];

Account updateacc = new Account(id=acc[0].id);
updateacc.billingstreet = getStreet();

update updateacc;

 

l.comapany is lead company name.

l.street is lead billing street.

 

I have referred many blogs. It is mentioned that your query should be selective one and field should be indexed.

 

I asked to Salesforce support team to index on billing street in order to avoid this warning.

But according to support team this query is not meeting the criteria for adding the index and finally they denied to add an index on billingstreet.

 

I am not sure how to avoid this error.

 

Please help me !!!!!

 

Thanks,

Sunil

 

In the Challenge it is requested to make a call to https://th-apex-http-callout.herokuapp.com/animals/:id.

Question is are they expecting a GET call or POST call. Most probably a GET call. But suppose integet pass to the method getAnimalNameById is "45678". How are we to formulate the URL.

Is it Option 1> replace id with value i.e https://th-apex-http-callout.herokuapp.com/animals/:45678
Option 2> pass using equal sign i.e https://th-apex-http-callout.herokuapp.com/animals/:id=45678.

Regardless i am getting the following response {"animal": {"id": 0,"name": "","eats": "","says": ""}}. I want some test data to verify the code is working does any body has that

Hi,

 

I am getting "Non-selective query against large object type" warning whenever this query is run and try to update account.

 

Here is my code.

 

List<Account> acc =[select id,name,phone from account where name=:l.company and billingstreet=:l.street limit 1];

Account updateacc = new Account(id=acc[0].id);
updateacc.billingstreet = getStreet();

update updateacc;

 

l.comapany is lead company name.

l.street is lead billing street.

 

I have referred many blogs. It is mentioned that your query should be selective one and field should be indexed.

 

I asked to Salesforce support team to index on billing street in order to avoid this warning.

But according to support team this query is not meeting the criteria for adding the index and finally they denied to add an index on billingstreet.

 

I am not sure how to avoid this error.

 

Please help me !!!!!

 

Thanks,

Sunil

 

Hi,

I have a situation where I need to dynamically set the default tab in a tab panel. I have a parameter in my controller that I'm trying to use but for some reason the default tab isn't being set. If I hard code the name of the tab it works but once I try to use a visual force parameter the default tab doesn't get set properly. Here's sample code that illustrates the problem:

Code:
public class TabTest {


 public String ActiveTab {get; set;} 
 
 
 public TabTest() {
  this.ActiveTab = 'Tab2'; 
 }


}

Code:
<apex:page controller="TabTest">
 <apex:tabPanel switchType="client" selectedTab="{!ActiveTab}" id="slipTabPanel">
    <apex:tab label="Tab 1" name="tab1" id="tab1">
      Tab1
    </apex:tab>
    <apex:tab label="Tab 2" name="tab2" id="tab2">
      Tab2 
    </apex:tab>
    <apex:tab label="Tab 3" name="tab3" id="tab3">
      Tab3
    </apex:tab>
 </apex:tabPanel>
</apex:page>

 If I hard code to selectedTab="tab2" then it works fine but if I try to use a controller parameter it doesn't work. Any ideas what I might be doing wrong?
 

  • September 10, 2008
  • Like
  • 0