• benv
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I can't query a custom formula field in the product2 object. I don't get an error when I put it in the SOQL SELECT statement, but I can't select it. I can select it from the Excel Connector, so it must be possible. Code:
$query_all_products = "select Id, ProductCode, Quantity__c, Warehouse_Location__c, WeightOunces__c, Shipping_Weight_Formula__c from product2";
$result = $sforce->query(array("queryString" => $query_all_products));
$all_products=$result->result->records;
echo '<pre>'.print_r($all_products,true).'</pre>';
Warehouse_Location__c
doesn't show up in the resulting object.And when I try using describeSObject:
$contact= $sforce->describeSObject("Contact");
print_r($contact);
I get this error: Fatal error: Uncaught SoapFault exception: [sf:INVALID_TYPE] INVALID_TYPE: sObject type cannot be null in (filename):3 Stack trace: #0 [internal function]: SoapClient->__call('describeSObject', Array) #1 (filename)(3): SoapClient->describeSObject('Contact') #2 {main} thrown in (filename) on line 3 Any ideas?
  • October 03, 2007
  • Like
  • 0
I figured I would start a new thread since the previous one wasn't really about this issue

http://community.salesforce.com/sforce/board/message?board.id=PerlDevelopment&message.id=2660

The new field Always_Ship_UPS__c shows up in the describeSObject() result. I also successfully updated the field using $sforce->update().

But when I put it in the field list of a SELECT statement, I don't get an error, but it never shows up in my result, whether or not the field has a value in Salesforce. This is the same thing that happened previously when I tried querying a custom formula field.

Any ideas?

Message Edited by benv on 10-15-2007 04:21 PM

I have this problem exactly several feilds just can not be selected. I ahve the most current WSDL they appear as objects with a describeSObject() but no columns are returning. Hell, I even did a

SELECT Id,fieldname from Account where Id='basdfasd'

and it returned this

Code:
object(stdClass)#7 (4) {
  ["done"]=>
  bool(true)
  ["queryLocator"]=>
  NULL
  ["records"]=>
  array(1) {
    [0]=>
    object(stdClass)#12 (1) {
      ["Id"]=>
      string(18) "basdfasd"
    }
  }
  ["size"]=>
  int(1)
}

 


as you see no feildname field is listed here this totally sucks

Message Edited by Tran Man on 10-17-2007 01:11 PM

I can't query a custom formula field in the product2 object. I don't get an error when I put it in the SOQL SELECT statement, but I can't select it. I can select it from the Excel Connector, so it must be possible. Code:
$query_all_products = "select Id, ProductCode, Quantity__c, Warehouse_Location__c, WeightOunces__c, Shipping_Weight_Formula__c from product2";
$result = $sforce->query(array("queryString" => $query_all_products));
$all_products=$result->result->records;
echo '<pre>'.print_r($all_products,true).'</pre>';
Warehouse_Location__c
doesn't show up in the resulting object.And when I try using describeSObject:
$contact= $sforce->describeSObject("Contact");
print_r($contact);
I get this error: Fatal error: Uncaught SoapFault exception: [sf:INVALID_TYPE] INVALID_TYPE: sObject type cannot be null in (filename):3 Stack trace: #0 [internal function]: SoapClient->__call('describeSObject', Array) #1 (filename)(3): SoapClient->describeSObject('Contact') #2 {main} thrown in (filename) on line 3 Any ideas?
  • October 03, 2007
  • Like
  • 0
I'm trying to get a record set of more than 2000 records and I know that I'm supposed to use the queryMore function to do that.

I read through many posts and I'm having a hard time knowing exactly how to do this in PHP.

Here is what I have and maybe someone can enlighten me as to what I have wrong. I'm pretty sure it has to do with the locator variable because that is coming up NULL when I echo it.

------------------------------------------------------
$query = "...my query which I know is working...";
 
  $response = $connection->query($query);

  while ($response->done == false)
  {
    $locator = $connection->queryLocator;
   
    $response = $connection->queryMore($locator, 2000);
  }

  return $response->records;
--------------------------------------------------------

Thanks