Update record

Update record in Quickbooks

Overview

Update a record in Quickbooks using the record ID.

Note: This task is applicable only to Zoho Creator.

Syntax

<variable> = intuit.quickbooks.update(<quickbooks_connection>, <quickbooks_module><company_ID><record_ID>, <syncToken><data_map>);

where,

ParameterDescriptionData type

<variable> 

is the variable which will hold the response returned by Quickbooks.

MAP

<quickbooks_connection> 

is the name of the Quickbooks connection.

STRING

<quickbooks_module>

Module in Quickbooks where the record will be updated.

Following are the names of applicable modules.

Customer

Vendor

Item

Invoice
AccountEmployee Department
STRING
<company_ID>

refers to the unique ID generated by Quickbooks for each account.

You can find this under Your Company -> Account and Settings -> Billing & Subscription -> Company Id in your Quickbooks account.

STRING

<record_ID>

ID of the record which needs to be updated.

Learn how to fetch the ID of a record after creating it or fetching it.

STRING
<syncToken>

Version number of the record. It's meant by Intuit to be a way to avoid two people working on the same record at the same time, and unknowingly overwriting each other's changes.

Learn how to fetch the syncToken after creating or fetching a record.

STRING
<data_map>

Input map with key as Quickbooks field's name and the updated value. For ex: {"FamilyName":input.Name} 

To learn about the field names, click here and navigate to required module on that page.

MAP

Update records in Quickbooks

The following snippet when executed updates the specified record in the "Customer" module in Quickbooks. 

response = salesforce.sales.update("Quickbooks", "Customer", "1241802285", "6", "3", {"FamilyName" : "Henry Paul"});

where,

ParameterDescription
"Quickbooks"is the name of the Quickbooks Connection
"Customer"is the module in Quickbooks, where the record will be updated
"1241802285​"is the ID of the record which needs to be updated
"6"ID of the record which will be updated
"3"syncToken of the record which will be updated
"FamilyName"Quickbooks field which will be updated with the value "Henry Paul"
responseis response returned as map by Quickbooks

Sample Response

Following is a sample success response returned by Quickbooks:

{  
   “Customer":"{"   ShipAddr":"{"   Line3":"123 street",
   "Long":"-122.0960826",
   "Line2":"Building 1",
   "Line1":"Intuit",
   "Lat":"37.4306346",
   "Id":"7"
}","PreferredDeliveryMethod":"Email",
"BalanceWithJobs":0,
"DisplayName":"Henry",
"FullyQualifiedName":"Henry",
"BillWithParent":false,
"Job":false,
"Active":true,
"MetaData":"{"CreateTime":"2014-08-01T02:29:29-07:00",
"LastUpdatedTime":"2014-08-07T04:10:06-07:00"
}","Taxable":false,
"BillAddr":"{"Long":"-77.02225539999999",
"Line1":"450 7th StreetnWashington DC",
"Lat":"38.8958239",
"Id":"6"
}","domain":"QBO",
"SyncToken":"3",
"PrintOnCheckName":"Hudson",
"CurrencyRef":"{"name":"Indian Rupee",
"value":"INR"
}","Id":"5",
"FamilyName":"HenryPaul",
"Balance":0,
"sparse":false
}","time":"2014-08-07T04:10:06.520-07:00"
}

The following is a sample failure response, returned due to invalid parameter name:

{  
   "Error":"[{ 
"   Detail":"Property Name:Can not instanti specified is unsupported or invalid",
   "Message":"Request has invalid or unsupported property",
   "code":"2010"
}
]"
}

Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com