Remove NetSuite Sublist Button

netsuite hide 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

Marty Zigman on "Learn how to Hide NetSuite Sublist Buttons and , This article is relevant if you want to hide some buttons and other HTML elements on NetSuite forms. Background. NetSuite's point-and-click  Below is a NetSuite beforeLoad server-side 2.0 SuiteScript to create a hidden HTML field that allows you to inject browser-based client-side JavaScript (not a NetSuite conventional client script) that will then find the buttons and use CSS to change the visibility to hidden via JQuery.

addSubList(name, type, label, tab) takes a type parameter, which decides the sub list type.

  1. editor - An edit sublist with non-inline form fields
  2. inlineeditor - An edit sublist with inline fields
  3. list - A list sublist with editable fields
  4. staticlist - A read-only segmentable list sublist.

So you might want to use a staticlist type.

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);

Sublist_obj.getButton(Button_Id);

Sublist_obj.removeButton(Button_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.

NetSuite: How to disable “new” button on a linked record in netsuite , 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  Since NetSuite doesn’t give us a better way of making these modifications for more advanced data models, I must work within the confines of their platform. Therefore, it is either a little javascript to change the label or remove the button completely, or we need to write a full customized Suitelet UI for about 20 different records and how they relate to eachother.

Comments
  • 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.