editCustomer

Retrieves a customer record for editing based on name. 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 record ID, use editCustomerByRecordID.

Parameters

Parameter Type Description
cookie long Session cookie returned by projectLogon.
firstName string Customer’s first name.
middleInitials string Customer’s middle initials.
lastName string Customer’s last name.

Return value

Value Type
pCustomer CUser

Example

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

 

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);

}