Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
Unknown SuiteScriptError "document\" is not defined
Hi All,
We try to create a payment card record in a suitelet script (ServerSide). It is referring the document object in Save.
The same script works on client-side. But receiving an error in server side.
The error message is shown below.
"type":"error.SuiteScriptError","name":"ReferenceError","message":"\"document\" is not defined.",
The code snippet is given below:-
var paymtCard = record.create({type:"paymentcard",isDynamic:false});
paymtCard.setValue("instrumenttype",1);
paymtCard.setValue("entity",obj.custpage_customer);
paymtCard.setValue("paymentmethod",cardType);
paymtCard.setValue("cardnumber",cardNumber);
paymtCard.setValue("cardbrand",creditCardBrand);
paymtCard.setValue("expirationdate",expirationDate);
paymtCard.setValue("nameoncard",cardHolderName);
paymtCard.setValue("cardtype","CREDIT");
paymtCard.setValue("memo",memo);