CAPITULO II REGISTROS ELECTRICOS Y HERRAMIENTAS DE
2.3. REGISTRO DE POROSIDAD
2.3.2. REGISTRO DE DENSIDAD
<complexType name="CheckItem"> <sequence>
<element name="item" type="platformCore:RecordRef " minOccurs="0"/> <element name="vendorName" type="xsd:string" minOccurs="0"/>
....
<element name="line" type="xsd:long" minOccurs="0"/>
<element name="location" type="platformCore:RecordRef " minOccurs="0"/> <element name="isBillable" type="xsd:boolean" minOccurs="0"/>
<element name="customFieldList" type="platformCore:CustomFieldList" minOccurs="0"/> </sequence>
</complexType>
<complexType name="CheckItemList"> <sequence>
<element name="item" type="tranBank:CheckItem" minOccurs="0" maxOccurs="unbounded"/> </sequence>
<attribute name="replaceAll" type="xsd:boolean" default="true"/> </complexType>
Updating Sublists in Web Services
When working with sublists, the approach for updating the lines in a sublist will vary depending on whether you are working with Keyed Sublists or Non-Keyed Sublists.
Keyed Sublists
Keyed sublists have an indexing line element or internal ID that can be used as a key. Keyed sublists allow you to set the replaceAll attribute to FALSE to update only the lines you are submitting in your SOAP request. When working with keyed sublists, the value of the replaceAll attribute has the following effects:
•
replaceAll = TRUE: When set to TRUE on a keyed sublist, the existing sublist isreplaced with the line submitted in your Web services request. Lines that do not match the newly submitted lines will be removed. Currently existing lines that match the new sublist submission will be updated. The default value for the replaceAll attribute is TRUE.
•
replaceAll = FALSE: When set to FALSE, the lines in your Web services request areadded to the existing list. If you specify a value for the line field on a specific line item, then that line is updated in the existing list.
Records, Fields, Forms, and Sublists in Web Services
Working with Sublists in Web Services
60
The following table lists all sublists that are categorized as keyed sublists in Web services. Sublists that do not appear in this table are considered Non-Keyed Sublists.
Sublist Sublist Key Appears on Record(s) accruedTimeList payrollitem Employee
addressbookList internalId Contact, Customer, Employee, Lead, Partner, Project, Prospect, Vendor
Note: When you work with the addressbookList on Customer records in the 2009.2 endpoint and beyond, be sure to use internalId as the key. Do not use label. For the 2009.1 and lower endpoints, the
addressbookList is not a keyed sublist.
applyList doc Customer Payment, Credit Memo, Customer Refund, Customer Deposit, Deposit Application, Vendor Payment
assigneeList resource Project Task attendeeList attendee Calendar Event
binNumberList binNumber Assembly Item (BOM Itme), Inventory Item, Lot Numbered Assemby Item, Lot Numbered Inventory Item, Serialized Assembly Item, Serialized Inventory Item
campaignDirectMailList internalId Campaign campaignEmailList internalId Campaign campaignEventList internalId Campaign companyContributionLi
st
payrollitem Employee
componentList item Assembly Unbuild, Assembly Build contactList company Customer, Partner, Vendor
creditList doc Customer Payment, Vendor Payment creditCardsList ccnumber (2009.2
endpoints and lower internalId (2010.1 endpoints and beyond)
Customer, Job
deductionList payrollitem Employee
depositList doc Customer Payment, Customer Refund
deptAccessList dept Custom Entity Field, CRM Custom Field, Other Custom Field, Item Custom Field, Transaction Body Custom Field, Transaction Column Custom Field, Item Option Custom Field, Custom Record Custom Field, Item Number Custom Field
directDepositList internalid Employee earningList payrollitem Employee expCostList doc Invoice, Cash Sale
Example
The following sample shows how to add an item to an opportunity record and modify an existing item in that record. To do this, set replaceAll to FALSE, add the new item, and modify the existing item by referencing the desired item in the line property. The following shows that the existing line item is modified to change the quantity.
<soapenv:Body> <platformMsgs:update xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s0="urn:sales_2011_1_0.transactions.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:platformMsgs="urn:messages_2_5.platform.webservices.netsuite.com"> <platformMsgs:record xsi:type="s0:Opportunity" internalId="1638">
<s0:itemList replaceAll="false"> <s0:item>
expenseList orderLine Check, Expense Report, Vendor Bill, Purchase Order, Item Receipt
itemList orderLine Cash Sale, Check, Estimate, Invoice, Item Fulfillment, Item Receipt, Credit Memo, Return Authorization, Cash Refund, Opportunity, Purchase Order, Sales Order, Vendor Bill
Note: On Item sublists, the value End of Group is not returned in Web services. This behavior mimics the behavior of the UI.
itemCostList doc Invoice, Cash Sale
itemsList item Promotion Code, Item Option Custom Field, Item Number Custom Field.
locationsList locationId Inventory Item, Serialized Inventory Item, Lot Numbered Inventory Item
nexusesTaxList nexus Tax Type
partnersList partner Estimate, Cash Sale, Invoice, Sales Order, Opportunity, Credit Memo, Return Authorization, Cash Refund, Customer
partnersList partner Promotion Code predecessorList task Project Task resourceList resource Calendar Event
roleAccessList role Entity Custom Field, CRM Custom Field, Other Custom Field, Item Custom Field, Transaction Body Custom Field, Transaction Column Custom Field, Item Option Custom Field, Custom Record Custom Field, Item Number Custom Field
salesTeam employee Customer, Invoice, Cash Sale timeList doc Invoice, Cash Sale
Records, Fields, Forms, and Sublists in Web Services
Working with Sublists in Web Services
62
<s0:item internalId="380" type="inventoryItem" /> <s0:quantity>1.0</s0:quantity> <s0:amount>20.0</s0:amount> </s0:item> <s0:item> <s0:line>2</s0:line> <s0:quantity>10.0</s0:quantity> </s0:item> </s0:itemList> </platformMsgs:record> </platformMsgs:update> </soapenv:Body>
Non-Keyed Sublists
Non-keyed sublists have no indexing line element or internal ID that can be used as a key. Each line in a non-keyed sublist is recorded in a flat list.
In the UI, non-keyed sublists and keyed sublists may look similar; however, technically, they are quite different. Because non-keyed sublists contain no referencing keys (or handles), you cannot update a specific line in a non-keyed sublist. Instead, you must interact with the sublist as a whole. In non-keyed sublists, the replaceAll attribute is ignored and behaves as if it were set to TRUE for all requests. Consequently, an update operation is similar to the add operation with respect to non-keyed sublists.
The Item Pricing sublist (CustomerItemPricingList) on the Customer record is one example of a non-keyed sublist (see figure). In the context of Web services, all sublists not listed in the Keyed Sublists table are considered to be non-keyed sublists.
The following bullets outline the behaviors of non-keyed sublists. The Item Pricing sublist (itemPricingList) on a Customer record is used in the examples.