I am simply trying to add a credit card to a customer record using server-side script.
I read the documentation and realized that only 2 columns were required when adding a credit card, the credit card number and the credit card type.
https://system.netsuite.com/help/helpcenter/en_US/RecordsBrowser/2013_1/Records/customer.html#sublists_div_creditcards
my attempt:
var record = nlapiLoadRecord(searchresults[i].getRecordType(), searchresults[i].getId()); record.setLineItemValue('addressbook', 'addr1', 1, addr1); record.setLineItemValue('addressbook', 'addr2', 1, addr2); //do I need anything here to transition from setting 1 machine type to the other? record.setLineItemValue('creditcards', 'ccnumber', 1, '4111111111111111'); record.setLineItemValue('creditcards', 'paymentmethod', 1,paymentmethod);//paymentmethod = 5 record.commitLineItem('creditcards'); nlapiSubmitRecord(record, false, true); results in this error: USER_ERROR Please enter value(s) for: Credit Card Number, Credit Card Type1. not sure why this is happening. the script successfully updates the address. any ideas?2. also, the documentation mentioned above shows the type for the expiration date as 'mmyydate'. what is that? is that '08/16' ? because in the UI the expiration date looks like '08/2016'.thanks for all and any feedback!