You are here: API Reference > Calls > update

update

Updates the information in one or more objects of the same type. You can specify different types of objects in different update calls, but each specific update call must only apply to one type of object.

Syntax and Argument

SaveResult[] = update(zObject[])

The argument is as shown in the following table. For information on the field types, see Field Types

Argument Description
zObject[] An array of one or more zObjects (of the same type) that you wish to update.

Using This Call

You can call update on an array of zObjects. It returns an array of SaveResults indicating the success or failure of updating each object. The following information applies to this call:

Response

SaveResult

Faults

InvalidTypeFault

UnexpectedErrorFault

Sample Code

ID id = new ID();
id.setID(accountId);

Account acc = new Account();
acc.setId(id);
acc.setName("Update Account Name");
ZObject[] objs = new ZObject[1];
objs[0] = acc;

Update update = new Update();
update.setZObjects(objs);
UpdateResponse uResp = stub.update(update, this.header);

SaveResult[] res = uResp.getResult();
ID updatedAccountId = res[0].getId();

SaveResult

Copyright © 2008-2009 Zuora, Inc.