cancelSaveCustomer

Unlocks a customer record locked by editCustomer or editCustomerByRecordID. Does not need to be called if saveCustomer is successful. A SOAP error envelope is returned if the operation fails.

Parameters

Parameter Type Description
cookie long Session cookie returned by projectLogon.
recordID long Unique customer record ID.

Return value

Value Type Notes
result int 0 indicates success. Check the return value in case of an error.

Example

CUser cust = ttsdk.editCustomer(cookie, "Firstname", "", "Lastname");

 

try

{

cust.emailtype = "Invalid emailtype";

// The following line throws an exception because emailtype is not set as a valid string.

ttsdk.saveCustomer(cookie, cust.firstname, cust.middleinitials, cust.lastname, cust);

}

catch (Exception e)

{

ttsdk.cancelSaveCustomer(cookie, cust.recordid);

}