You need to sign in to do that
Don't have an account?

how do I pull single field from describeSObject?
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
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
Try this script and tell me if it works for you!
~Mike