Hi Guys. Can someone guide me on how I can hide th...
# suitescript
j
Hi Guys. Can someone guide me on how I can hide the button on my sublist. I want to hide these three buttons.
Here's my code that i have used via SS2.0:
Copy code
var shippingdetails = form.getSublist({id:'recmachcustrecord_hndsd_mainlink'});
log.debug('shippingdetails',shippingdetails);
if(shippingdetails){
	shippingdetails.removeButton('newrecrecmachcustrecord_hndsd_mainlink');
    shippingdetails.removeButton('customize');
	shippingdetails.removeButton('attach');
}
here's the log error. i am really not familiar on this one.
m
There is no method removeButton on a sublist. I don't believe there is a supported way to hide a button. You probably have to hide via DOM manipulation
j
I have already created this feat using 1.0.
Copy code
var payproposaldetail = form.getSubList('recmachcustrecord_pc_pp_ct_link');
		if(payproposaldetail){
			payproposaldetail.removeButton('newrecrecmachcustrecord_pc_pp_ct_link');
			payproposaldetail.removeButton('customize');
			payproposaldetail.removeButton('attach');
		}
But I am not familiar in using 2.0. or maybe this feat in 1.0 is unavailable in 2.0
b
undocumented function in 1.0 has no equivalent in 2.0
j
i just used 1.0 to hide those buttons
thanks.