10.07.2015 Views

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Records, Fields, Forms, and Sublists in <strong>Web</strong> <strong>Services</strong>Working with Sublists in <strong>Web</strong> <strong>Services</strong>64Matrix Sublists and replaceAllMatrix sublists respect the replaceAll attribute for updates, as other Keyed Sublists do, but insome cases, updates to matrix sublists require additional handling.Matrix sublists require additional handling for replaceAll because body-level fields slave valuesinto them. For example, setting the pricing schedule for an item dictates values in the pricingmatrix. In the UI, when a pricing schedule is selected, the pricing schedule logic is run first,and values specified in the pricing matrix sublist are taken into account to arrive at what theupdate should do. However, the UI does not have the notion of replaceAll because the userinteracting with the form can delete values they don't want to keep in individual fields.<strong>Web</strong> services requests cannot delete individual field values in a sublist. The only way to get ridof old values is to set replaceAll to TRUE and send all values in the update request. Some bodyfields can override values in a matrix sublist, but a <strong>Web</strong> services request can then change someor all of these sublist values, depending on the replaceAll setting.Review the following cases to get an understanding of how the slaving of values from bodyfields into a matrix sublist interacts with the replaceAll setting on updates:• No sublist values from body fields and replaceAll=TRUEThe <strong>Web</strong> services request does not include any body field values that drive values inthe sublist, so the update is handled like those in other keyed sublists where replaceAllis set to TRUE.The existing sublist is replaced with the sublist submitted in the <strong>Web</strong> services request.The newly submitted sublist should include all values.• No sublist values from body fields and replaceAll = FALSEThe <strong>Web</strong> services request does not include any body field values that drive values inthe sublist, so the update is handled like those in other keyed sublists where replaceAllis set to FALSE.Lines in the existing sublist are selectively updated with lines in the sublist submittedin the <strong>Web</strong> services request. The newly submitted sublist need only include values tobe added and updated.• Sublist values from body fields and replaceAll=TRUEThe <strong>Web</strong> services request sets body field value(s) that drive values in the sublist, sospecialized handling is required.First, all sublist values are removed. Next, sublist values driven by body field values areset. Then, the sublist is updated with all lines specified in the newly submitted sublist.The newly submitted sublist lines thus override the values driven by body fields.Important: When sublist values from a <strong>Web</strong> services request override values driven bybody fields, errors may occur. If you do not want these overrides, you mustset replaceAll to FALSE. For example, if you are setting a quantity pricingschedule, you should set ReplaceAll to FALSE.<strong>SuiteTalk</strong> <strong>Platform</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!