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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 18, 2026, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 15 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
What is the best way to handle Custom Record (CRUD) in a Suitelet?
Hello everyone,
I would like your opinion to know if I'm using the best way to do the following:
[LIST]
[*]Open a Suitelet with a Button from Sales Order
[/LIST] For that step, I created a button in a UserEvent script in beforeLoad(context) method linked to Sales Order , my button call a function in a linked ClientScript:
function addButton(thisForm){ thisForm.clientScriptModulePath = "../folderPath/myClientScript.js"; thisForm.addButton({ id: "custpage_myButton", label: "Open Suitelet", functionName: "loadCustomRecordInSuitelet" }); }Then, the ClientScript triggers the opening of the Suitelet with this function:
function loadCustomRecordInSuitelet(){ var soRec = currentRecord.get(); var slUrl = url.resolveScript({ scriptId: "customscript_mysuitelet_script_id", deploymentId: "customdeploy_mysuitelet_script_deploy_id", params: {rectype: soRec.type, recid: soRec.id} }); window.open(slUrl,'popUpWindow','height=800,width=1200,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes'); } 0