• sideburn
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies
Hi. I want to add an account to my contact. I created an account and got the account's owner ID and then i try to insert that ID into my contact but no luck. This is what I am doing:

$FIELDS=array('type'=>'contact','FirstName'=>'newtest','LastName'=>'test', 'AccountId'=>"00530000000p0A8AAI");
$result = $client->create($FIELDS);

if I do this:

$FIELDS=array('type'=>'contact','FirstName'=>'newtest','LastName'=>'test');

the contact does get created..so it has something to do with trying to add the account to the contact.

I also tried $client->insert

any help would be great, thanks.
Hi, I have the following code to get the owner id from an account:

$query_str = "select 'OwnerId' from 'account' where Name = 'The Company Name'";

$result = $client->query($query_str,1)
while (list($k1, $record) = each($result->records)) {
printf(":: %s",$record);
}
this is the output result:

:: Account
::
:: 00530000000QJjmAAG

It works but all I want is the account ID itself not the other 2 strings. Can someone explain why this is happenening? (I'm just trying to get an account ID from an account Name)...Thanks.

Message Edited by sideburn on 02-23-2006 01:31 AM

Hi. I want to add an account to my contact. I created an account and got the account's owner ID and then i try to insert that ID into my contact but no luck. This is what I am doing:

$FIELDS=array('type'=>'contact','FirstName'=>'newtest','LastName'=>'test', 'AccountId'=>"00530000000p0A8AAI");
$result = $client->create($FIELDS);

if I do this:

$FIELDS=array('type'=>'contact','FirstName'=>'newtest','LastName'=>'test');

the contact does get created..so it has something to do with trying to add the account to the contact.

I also tried $client->insert

any help would be great, thanks.
Hi, I have the following code to get the owner id from an account:

$query_str = "select 'OwnerId' from 'account' where Name = 'The Company Name'";

$result = $client->query($query_str,1)
while (list($k1, $record) = each($result->records)) {
printf(":: %s",$record);
}
this is the output result:

:: Account
::
:: 00530000000QJjmAAG

It works but all I want is the account ID itself not the other 2 strings. Can someone explain why this is happenening? (I'm just trying to get an account ID from an account Name)...Thanks.

Message Edited by sideburn on 02-23-2006 01:31 AM

Hello,

            I try to insert account name into my contact ,it is not creating the contact.How to do that?

$fields = array('type'=>'contact','LastName'=>'Inbam', 'Account_Name' =>'Mall Tech');

 

  • February 21, 2004
  • Like
  • 0