initialize / initializeList
You can use the initialize operation in SOAP web services to emulate the UI workflow by prepopulating fields on transaction line items with values from a related record. Your SOAP web services application can then modify only the values it needs to before submitting the record.
SOAP Request
The following example shows the usage of the initialize operation.
<soapenv:Body>
<platformMsgs:initialize xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:platformCoreTyp="urn:types.core_2025_1.platform.webservices.netsuite.com" xmlns:platformCore="urn:core_2025_1.platform.webservices.netsuite.com" xmlns:platformMsgs="urn:messages_2025_1.platform.webservices.netsuite.com">
<platformMsgs:initializeRecord>
<platformCore:type>invoice</platformCore:type>
<platformCore:reference internalId="1513" type="salesOrder">
<platformCore:name>1511</platformCore:name>
</platformCore:reference>
</platformMsgs:initializeRecord>
</platformMsgs:initialize>
</soapenv:Body>
The following example shows the usage of the initializeList operation.
<initializeList xmlns="urn:messages_2025_1.platform.webservices.netsuite.com">
<initializeRecord>
<ns1:type
xmlns:ns1="urn:core_2025_1.platform.webservices.netsuite.com">customerPayment
</ns1:type>
<ns2:reference internalId="176" type="customer"
xmlns:ns2="urn:core_2025_1.platform.webservices.netsuite.com"/>
</initializeRecord>
<initializeRecord>
<ns3:type xmlns:ns3="urn:core_2025_1.platform.webservices.netsuite.com">
invoice</ns3:type>
<ns4:reference internalId="176" type="customer"
xmlns:ns4="urn:core_2025_1.platform.webservices.netsuite.com"/>
</initializeRecord>
</initializeList>
REST Request
In REST web services, the create-form operation returns a record form with all fields prefilled. This operation enables you to see all default fields and the line IDs of default lines on a record, and you can modify these values before submitting the record.
You can use the create-form operation by including the custom mediaType Accept: application/vnd.oracle.resource+json; type=create-form in your REST request header.
The create-form operation supports the same query parameters as a GET response:
-
expand
-
expandSubResources
-
fields
The following request returns all fields set on the target record without submitting the record.
POST ../record/v1/salesorder/1/!transform/itemfulfillment
Accept: application/vnd.oracle.resource+json; type=create-form
{}
The following is an example of the response.
Content-Type: application/vnd.oracle.resource+json; type=create-form
{
"links": [
{
"rel": "self",
"method": "POST",
"mediaType": "application/vnd.oracle.resource+json; type=create-form",
"href": "../record/v1/salesorder/1/!transform/itemfulfillment"
},
{
"rel": "transform",
"method": "POST",
"href": "../record/v1/salesorder/1/!transform/itemfulfillment",
}
],
"... itemFulfillment fields ..."
}