I am attempting to update a vendor bill in a close...
# suitescript
j
I am attempting to update a vendor bill in a closed period, to update the billing address for our check run. I am trying to use a client script, I am used to using nlapiSetFieldValue, but I'm not sure that this is correct. Is anybody able to give me a little guidance on this? It's not something I usually handle
b
be very careful about trying this in client script
addresses are basically the only subrecord ive found that sometimes works
Using SuiteScript with Address Subrecords documents how to use subrecords
j
well, for some reason when manually editing the address, it won't update. It only occurs on transactions where the period is closed (even though this is a non-gl change, and the correct permission is granted)
the correct address is selected, and the record is saved, it says its successful, butt hen the record never updates, and nothing shows in system notes
b
you should probably check if its the actual fields on the address that are the problem
or if its only the address text
j
the address on the vendor record updated properly
but when selecting the address on the vendor bill under the billing tab, it still displays old values, and will not update when toggled
I was thinkinga bout using something similar to this.... var recobj = nlapiLoadRecod("vendorbill",3610248); recobj.setFieldValue('billingaddress',23282); nlapiSubmitRecord(recobj,true);
b
transactions are supposed to retain the values of the address at the time the transaction was made
primarily so that updating an address doesnt destroy your historical data
j
yes, but I am going to the transaction record and toggling the address, to get it to update. and it does update, until I hit 'save', then it saves the record, but reverts back to the old address.
b
you may want to just use a custom address on a transaction
j
still does not work. reverts to previous address
b
i believe the code you share is supposed to select the bill address select field, which is
billaddresslist
that said, if it doesnt work in the ui, its unlikely to work in script