How To Trigger Field Change On Click Of Mark All Button?
Category : NetSuite suitescript
First use inspect element on the mark all button and get it’s id. Let the id be ‘markall’ for this example. On the client page init, write the below code (change the internal id based on your record):
document.getElementById(“markall”).onclick = function() {markall();};
function markall() {
var count = nlapiGetLineItemCount(‘payment’);
for(var i=1;i<=count;i++)
{
nlapiSelectLineItem(‘payment’, i);
nlapiSetCurrentLineItemValue(‘payment’, ‘apply’, ‘T’, true, false);
}
}
Now, client field change function will be triggered when you click on mark all button. Similarly you can write code for unmark all button.
Feel free to reach out TheSmilingCoders for proper netsuite implementation, netsuite consultation , netsuite customization, netsuite Support,netsuite Training contact us at:
Email : [email protected]
Linkedin : https://www.linkedin.com/company/netsuite-academy/