• Vivek Viswanathan
  • NEWBIE
  • 0 Points
  • Member since 2009

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

As soon as I try to query data using the Bulk API (24.0) and use a relationship I get the following message:

 

InvalidBatch : Failed to process query: FUNCTIONALITY_NOT_ENABLED: Foreign Key Relationships not supported in Bulk Query

 

According to the docs this is not a limitation of the Bulk API.  Is it possible to perform a query like: "SELECT Id, FIrstName, LastName, Account.Name FROM Contact"  or are we limited to a single table?

 

GlennW

I am trying to query records and getting error : System.Exception: retrieve id limit reached.

 

What does this mean and how can this be resolved?

 

Suggestions please? 

  • March 15, 2010
  • Like
  • 0
Hi Experts,
 
Though this question has already been asked by other, no definite answer has been made. Please help me.
 
To be straight, I have the following code:
 
Code:
<apex:page showHeader="false" controller="VehicleListControllerClass_2">
 <apex:form>
  <apex:pageBlock title="Vehicle List for {!personname}">
   <apex:pageBlockList value="{!vehicleList}" var="v">
    <apex:column value="{!v.VehicleName}"/>
    <apex:column value="{!v.PersonVehicle.Vehicle__r.Name}"/>
    <apex:column headerValue="Vehicle">
     <apex:outputLink value="/{!v.PersonVehicle.Vehicle__c}" target="_top">{!v.PersonVehicle.Vehicle__r.Name}</apex:outputLink>
    </apex:column>
    <apex:column>
     <apex:commandLink value="Click This Link" action="{!dosomething}" >
      <apex:param name="myparm" value="Link abcd"/>
     </apex:commandLink>
    </apex:column>
    <apex:column>
    <apex:commandButton value="Click This Button" action="{!dosomething}" styleClass="btn">
     <apex:param assignTo="{!MP}" name="myparm1" value="abcd"/>
     <apex:param name="myparm2" value="Button abcd"/>
    </apex:commandButton>
    </apex:column>
   </apex:pageBlockList>
  </apex:pageBlock>
 </apex:form>
</apex:page>


public class VehicleListControllerClass_2{

 public String getPersonName(){
  ID pId = System.currentPageReference().getParameters().get('id');
  String name = [Select Name from Person__c where id=:pId].Name;
  return name;
 }

 public class Vehicles{
  Person_Vehicle__c pv;
  //Constructor
  public Vehicles(Person_Vehicle__c pvin) {pv = pvin;}

  public Person_Vehicle__c getPersonVehicle() {return pv;}

  public String getVehicleName(){

   if(pv.Vehicle__r.Name == 'Maruti 800') return 'It is Maruti 800 yar';
   else return pv.Vehicle__r.Name;
  }

  Integer curYear = system.now().year();
  return (curYear - (Integer)pv.Purchase_Year__c);
  }
 }

 List<Vehicles> pvlist = new List<Vehicles>();

 public List<Vehicles> getVehicleList(){
  ID pId = System.currentPageReference().getParameters().get('id');

  pvlist.clear();
  for(Person_Vehicle__c pvv : [Select p.Person__r.Name, p.Vehicle__c,
  p.Vehicle__r.Name, p.Purchase_Year__c from Person_Vehicle__c p where p.Person__c=:pId]){
   pvlist.add(new Vehicles(pvv));
  }

  return pvlist;
 }

 String p;
 public String getMP(){
  return p;
 }

 public void setMP(String s){
  p=s;
 }
 
 public PageReference dosomething(){
  String s = System.CurrentPageReference().getParameters().get('myparm');
  String s1 = System.CurrentPageReference().getParameters().get('myparm1');
  String s2 = System.CurrentPageReference().getParameters().get('myparm2');
  System.debug(s);
  System.debug(s1);
  System.debug(s2);
  return null;
 }

}

When I click on the link 'Click This Link', String 's' returns 'Link abcd' which is correct.
 
But when I click on the link 'Click This Button', both Strings 's1' and 's2' returns null.
 
How could I get the param value in controller in case of 'commandButton'?
Please note that I Must use commandButton and I need to pass more than one parameters.
 
Also, I would like to be able to create a new Case (in another visualforce page) with few default values by clicking a commandButton. The page should open as if user clicked on 'New' button and ready to Save. Please note that the page will not be associated with 'Case' controller.
 
How could I achieve this functionality?
 
Thanks,
-Roshan