Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Companies being loaded into Contacts #38

Closed
tl8roy opened this issue Jun 23, 2015 · 1 comment
Closed

Companies being loaded into Contacts #38

tl8roy opened this issue Jun 23, 2015 · 1 comment

Comments

@tl8roy
Copy link

tl8roy commented Jun 23, 2015

I am running some tests using the 1.0.0 release.
We have Companies and Contacts that need to be loaded. Everything is pushed up in batches to reduce the amount of updates. The problem is that when adding the Company they are loading into the contacts. When we go and try to update the entry, it is failing because it can't find the entity.

Here is the code for the insert or update. $crm_method is set by whether $crm_company_id is null or not :

$dataObject = $infusionsoft->data();
if($crm_method == 'insert'){
    $crm_company_id = $dataObject->add('Company',   $values);
    $sql = "update company set crm_infusionsoft_company_id = '" . $crm_company_id . "' where company_id = '" . $company_id . "' ";
    sql_query_write($sql);
} else {
    $crm_company_id = $row['crm_infusionsoft_company_id'];
    $dataObject->update('Company',$crm_company_id,  $values);
}

Here is the error that is being generated when our end tries to update:

PHP Fatal error:  Uncaught exception 'Infusionsoft\Http\HttpException' with message 'exception 'fXmlRpc\Exception\ResponseException' with message '[RecordNotFound]Unable to perform update. Record not found for Id:48872' in /var/www/xyz/models/CRM/lstrojny/fxmlrpc/src/fXmlRpc/Exception/ResponseException.php:33
Stack trace:
#0 /var/www/xyz/models/CRM/lstrojny/fxmlrpc/src/fXmlRpc/Client.php(162): fXmlRpc\Exception\ResponseException::fault(Array)
#1 /var/www/xyz/models/CRM/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php(28): fXmlRpc\Client->call('DataService.upd...', Array)
#2 /var/www/xyz/models/CRM/infusionsoft/php-sdk/src/Infusionsoft/Infusionsoft.php(384): Infusionsoft\Http\InfusionsoftSerializer->request('https://api.inf...', 'DataService.upd...', Array, Object(Infusionsoft\Http\CurlClient))
#3 /var/www/xyz/models/CRM/infusionsoft/php-sdk/src/Infusionsoft/Api/DataService. in /var/www/xyz/models/CRM/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php on line 34
@mfairch
Copy link
Contributor

mfairch commented Jun 23, 2015

@tl8roy This actually isn't an SDK issue, its how the API was designed.

We're trying to keep Github issues to issues about the SDK. We have a ticketing system where you can submit a ticket about this.

https://developer.infusionsoft.com/support/tickets/create/

@mfairch mfairch closed this as completed Jun 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants