• phpAgent
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi evreyone!
I am managing to get the field list using the describeSObject.

$ref2 = $mySforceConnection->describeSObject('contact');
$fields = $ref2->fields;

now if i want a certain field i have to iterate through the whole object like this

foreach ($fields as $key => $value)
    {
        if($value->name == "FieldName")
        {
          code...
            }
        }   
    }

how do get a hash array of all the fields ?
i want  to just do: $fields['FieldName']


tnx

Hi
I am trying to get picklist values (and modify them ) in the PHP API.
I can only find examples in Java and .NET.
I don't mind converting the examples to PHP , but I get stuck at the point of creating the object .


The object's class definition is not in the SS include files!
DescribeSObjectResult is only mentioned in the wsdl file .
How does this work? is the object created remotely?

I will really appreciate a PHP sample!

 

 

Hi
I am trying to get picklist values (and modify them ) in the PHP API.
I can only find examples in Java and .NET.
I don't mind converting the examples to PHP , but I get stuck at the point of creating the object .


The object's class definition is not in the SS include files!
DescribeSObjectResult is only mentioned in the wsdl file .
How does this work? is the object created remotely?

I will really appreciate a PHP sample!

 

 

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