Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
nlapiCopyRecord not working on custom record
Hi,
I am trying to duplicate a record in a custom record type, but it seems to create a new record instead. First of all, I when I ran my script it asked me to supply a 'name' (as the 'Include Name field' is checked) which I did, everything went through with no error. Then I noticed that it had not duplicated the record, but instead just created a new one with all the fields empty. Can anyone please shed some light on this? Here is my code:
var salesOrderAttr = nlapiCopyRecord('customrecord_tran_item_att', 47); salesOrderAttr.setFieldValue('custrecord_quote_id',null); salesOrderAttr.setFieldValue('custrecord_sales_order_id',salesOrderId); salesOrderAttr.setFieldValue('name', 'testing'); var errorFlag = nlapiSubmitRecord(salesOrderAttr); 0