Hey guys, I’m trying to close a Purchase Order vi...
# suitescript
r
Hey guys, I’m trying to close a Purchase Order via 2.0 Client Script and am not sure why this line does not work:
context.currentRecord.setValue('orderstatus', 'H')
I figured it was ‘H’ based on this: https://dreamxtream.wordpress.com/2011/04/18/netsuite-transaction-status-codes/ I have also tried setting status and statusRef to ‘Closed’, and ‘closed’ respectively but none of those work. Does anyone have any ideas?
a
I think it would be 'PurchOrd:H' not just H
r
I tried both and neither worked 😕 If you do a getValue, it returns a single letter like ‘E’
a
Actually in suitescript 2.0 i noticed that the search results for statuses have changed yet again, the text values are like 'Pending Receipt' and value is 'pendingReceipt'. I tried to lookup if Suiteanswers have a list of all statuses in suitescript 2. but no luck so far... for suitescript 1, there is a list of internal ids for transaction statuses
l
@Randy you can't set status to closed - you have to mark is closed checkbox on lines to get the order closed.
👍 1
but I think it was already mentioned in the main thread