Hi all - I'm just using SS2.0 to successfully set ...
# suitescript
y
Hi all - I'm just using SS2.0 to successfully set the shipping address on an estimate (quote) record, however when doing basically the same thing for the billing address, none of the fields get filled in and for some reason the whole address gets cleared, and state set to ACT by default? For reference, this is what I'm doing for the shipping address which works:
Copy code
objRecord.setValue({
          fieldId: 'shipstate',
          value: context.shipping_address.province_code
        });
And this is what I'm doing for the billing address which doesn't:
Copy code
objRecord.setValue({
          fieldId: 'billstate',
          value: context.billing_address.province_code
        });
I'm going to try something like what was suggested here below, but could there be any reason why the billing address fails to be set, using basically the same code as the shipping state for SS2.0? Has anyone encountered this before? https://stackoverflow.com/questions/62256547/netsuite-ss-2-0-salesorder-custom-address
s
In general I find it more reliable to always use address subrecords. The answer on the question you linked actually says exactly that. If you want working with that subrecord to be trivially easy, use NFT>
1
those body level fields are vestiges of long ago
y
@Shawn Talbert yeah somehow working with the subrecord directly seems to do the right thing, so I'll just stick to doing that 😅 Thank you though that is definitely good to know, and it makes sense to be honest. I just had to convert my script from 1.0 to 2.0 so I probably should have realized 🙂