Tip 17: Setting Checkbox in Suitescript 2.0

Hello Friends,

I am exploring Suitescript 2.0 recently and learning new things day by day and I believe I should share it with you all who are also learning Suitescript 2.0.

There are some features which either you won’t get it in document or its wrong in Developer Guide of Suitescript 2.0

Even though its mentioned that in Suitescript 2.0 Checkbox value returns true/false rather than “T”/”F” unlike in Suitescript 1.0, but remember, when you will set Checkbox value use “T”/”F” not true/false.

var fldObj = form.addField({
                    id: ‘custpage_fld_chkbox’,
                    type: serverWidget.FieldType.CHECKBOX,
                    label: ‘Extracting Account?’,
                    container : ‘custpage_tab1’
});
fldObj.defaultValue = ‘T’;

Hope this small tip will save your time and effort.

I will keep on adding tip on Suitescript 2.0

Happy Coding 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s