In SS2.0, I am creating a new sales order record i...
# suitescript
w
In SS2.0, I am creating a new sales order record in standard mode with custom billing and shipping addresses. I am using shippingaddress = record.getSubRecord({fieldid: 'shippingaddress'}), then setting the values with shippingaddress.setValue({fieldid: somefield, value: somevalue}). The documentation says nothing about committing the address subrecords before saving the sales order, as I had done previously in SS1.0. The script errors out like the sales order does not have any billing/shipping addresses. I assume because the subrecords are not being committed. What is the syntax for committing a subrecord in SS2.0?