Source a sublist ‘list Field’ with select options , based on another sublist value.

I have created a suitelet with a sublist . In that Sublist i have one list field . Based on the value selected on that field , I have to add list options to the next  ‘list field’.

For eg., if im chosing a subsidiary in a field . i wanted all the items associated with the that subsidiary in the next drop down field. ( Note : these fields are in line level i.e, sublist fields).

Using client script , i have tried with sublist changed entry point . But it only triggers when one line is inserted , not immediately when i chose the subsidiary field.

So Please suggest an idea or already built solution or links i could refer  that could help me with this problem .

Or suggest any new idea for handling this issue .

 

Thanks in advance !

Suitelet PicBased on the selection of value in the first list field , value for the second list has to be added. (Sublist fields)

Rookie Asked on June 1, 2021 in SuiteScript.
Add Comment
1 Answer(s)

In your Client Script, use the fieldChanged entry point.  Because these are sublist fields, reference the sublist id along with the field name to accomplish this.  For example, if your sublist here is “reserveitems,” and you first select field is “productgroup”

 

 if (context.sublistId == “reserveitems” && context.fieldId == “productgroup”) {
                 doSomethingintheotherfield();
             }
Rookie Answered on June 4, 2021.
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