How to add elements to serverWidget.createList(options)

I want source subsidiary  list to form .addfield.

var field = form.addField({ id : ‘custpage_subsidiary’, type : serverWidget.FieldType.SELECT, label : ‘subsidiary’,source:susidiarylist });

But I am not getting how to create subsidiary list in suitelet.

Could anyone help please?

 

Beginner Asked on February 24, 2023 in SuiteScript.
Add Comment
3 Answer(s)

Hi,

The “source” argument is used to source data from standard lists/record so you would typically do:

source: 'subsidiary'

Thanks,

Chris

Intermediate Answered on February 24, 2023.
Add Comment

Thanks Chris! There is ‘year’ field on custom record. which is free form text. How to source that to select field on suitelet. Could yo help please?

 

Beginner Answered on February 26, 2023.
Add Comment

For that one you’re going to need to add the options yourself some the source parameter only works with records/lists.

You need to get the options and then use addSelectOption().

Intermediate Answered on February 26, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor