Use create to create one or more objects of a specific type. You can specify different types in different create calls, but each create call must only apply to one type of object.
SaveResult[] = create(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 objects of type zObject. |
You can call create on an array of one or more zObjects. It returns an array of SaveResults indicating the success or failure of creating each object. The following information applies to this call:
// create account Account acc = new Account(); acc.setName("Test Account"); acc.setBatch("Batch1"); acc.setBillCycleDay(1); acc.setAllowInvoiceEdit(true); acc.setCurrency("USD"); acc.setStatus("Draft");
ZObject[] objs = new ZObject[1]; objs[0] = acc;
Create create = new Create(); create.setZObjects(objs);
CreateResponse resp = stub.create(create, this.header); SaveResult[] res = resp.getResult(); ID accountId = res[0].getId();
Creating a New Active Account with the create Call
Copyright © 2008-2009 Zuora, Inc.