Remove NetSuite Sublist Button
how to create a button in netsuite
I have a NetSuite Suitelet script that is listing all of a customer's credit cards so that they can edit the cards themselves.
I would like to remove the "remove" button from that sublist, if possible. I've looked all over the NetSuite support site, with no luck. Has anyone encountered this before?
Below is the code that I have:
var creditCardSublist=form.addSubList('custpage_credit_card_sublist','inlineeditor','Current Credit Cards'); /* this does not work */ form.removeButton('custpage_credit_card_sublist_remove'); /* this does not work either*/ creditCardSublist.removeButton('custpage_credit_card_sublist_remove');
Thanks for any assistance with this.
Actually client side is what you have to do.
You create a client script to go along with your suitelet. use form.setScript... to associate it.
in the client script create an initLine function. That function can use jQuery (automatically included by Netsuite) to find and remove the Remove button.
This is a hack but Netsuite doesn't have any API for manipulating those lists
addSubList(name, type, label, tab) takes a type parameter, which decides the sub list type.
- editor - An edit sublist with non-inline form fields
- inlineeditor - An edit sublist with inline fields
- list - A list sublist with editable fields
- staticlist - A read-only segmentable list sublist.
So you might want to use a
Remove NetSuite Sublist Button - netsuite - iOS, I have a NetSuite Suitelet script that is listing all of a customer's credit cards so that they can edit the cards themselves. I would like to remove the "remove" button One of the native NetSuite action available in Workflow state is called “Remove Button”. This action allows you to choose which button to remove. On state edit window, click “New Action”. This will bring up another window that lists out all native action as well as custom workflow actions you’ve created
Sublist_obj = form.getSubList(Sublist_ID);
How to Hide the Buttons in a NetSuite Page, Since i need to hide the buttons in both "View" mode and "Edit" mode, /learn-how-to-hide-netsuite-sublist-buttons-and-other-html-elements/ You could inject a jquery formula into an inline field on the form to have it not show the button. You can put in your SuiteScript and then find the value of the field on the page and remove it if it fits your criteria. That button is on a sublist, so it may be hard to access normally with a script.
How to Hide NetSuite Buttons Using Workflow, Placing custom buttons on native or custom records is a useful NetSuite customization feature. What if you want to remove existing native NetSuite Records are divided into Body fields and Sublists. There are four types of sublists: Static, Editor, Inline Editor, and List. We are able to add, insert, edit, and remove line items using Sublist APIs. For a reference on exactly which sublists support SuiteScript, see the NetSuite Help page titled "Scriptable Sublists".
clear all lines button on sales order item sublist (suitescript) : Netsuite, The sublist has a clear all lines button that doesn't seem to fire the to know how I can remove a customer's "New Sales Order" button and flag the account (with Then, click the button labeled “New Sublist Group”: The screen that pops up looks similar to any other Action or Action Group pop up. Here, you can define the trigger, event types, contexts, and conditions that should apply to the group.
- Thanks. I did not think about using jQuery on the client side to remove it. jQuery could definitely handle any script issues I run into. Great idea! The solution I went with (after being told by NetSuite that it is not possible to remove that button), was just to add in a comparison function into the script to double check all of the original rows against the new rows.
- This would not work, since the form is for customers to edit their own CC information. Being a read-only list would not allow that feature.