function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Problem when creating a contact with account name

I am new to the SalesForce.I have downloaded the PHP toolkit and was trying to create a Contact which includes the Account details

This was the code i have tried

$mySforceConnection = new SforcePartnerClient();
  $sforceSoapClient = $mySforceConnection->createConnection($wsdl);

    $FirstName = "sample";
    $LastName = "Test";
    $MailingStreet = "xxx";
    $MailingCity = "yyy";
    $MailingState = "zzzz";
    $MailingCountry = "India";
    $MailingPostalCode = "500 081";
    $Phone = "9886754427";
    $Email = "";
    $LeadSource = "Web";
    $Languages__c = "English";
    $Level__c = "Primary";
    $Account = "xxx account name";
    $sObject = new SObject();
    $sObject->fields = $fieldsToCreate;
    $sObject->type = 'Contact';
    $acct = $mySforceConnection->create(array ($sObject));

When working with this code getting an error

SoapFault Object ( [message:protected] => INVALID_FIELD: No such column 'Account' on entity 'contact'. [string:private] => [code:protected] => 0 [file:protected] => C:\wamp\www\php toolkit\soapclient\SforceBaseClient.php [line:protected] => 324 [trace:private]

Please help me regarding this,of how can i include the account info when creating a contact

Thanks in Advance
You specify the accountId, not the account name (account names are not unique)
Thanks Zak,
                 Its working now