editCustomerByRecordID
Retrieves a customer record for editing based on record ID. A saveCustomer operation must be used with this operation to save any changes to the record. A SOAP error envelope is returned if the operation fails.
To unlock the record without saving changes, use cancelSaveCustomer.
To edit a customer based on name, use editCustomer.
Parameters
Parameter | Type | Description |
---|---|---|
cookie | long | Session cookie returned by projectLogon. |
recordID | long | Unique customer record ID. |
Return value
Value | Type |
---|---|
pCustomer | CUser |
Example
CUser cust = ttsdk.editCustomerByRecordID(cookie, 1);
try
{
cust.middleinitials = "M";
// The following line throws an exception if the operation fails.
ttsdk.saveCustomer(cookie, cust.firstname, cust.middleinitials, cust.lastname, cust);
}
catch (Exception e)
{
// The following operation unlocks the record.
ttsdk.cancelSaveCustomer(cookie, cust.recordid);
}