clientScriptModulePath added from suitelet which creates a list doesn’t trigger page init.

Hello. 

If I create a list in a SuiteLet with the serverWidget, and set the clientScriptModulePath like this:

var list = nsServerWidget.createList({
    title: ‘sometitle’,
});

list.clientScriptModulePath = ‘./path/to/script.js’;

When I navigate to the page, I see the clientScript and everything looks legitimate.

However, the pageInit function doesn’t fire at all. I’ve tried running just a console.log, a debugger statement, an breakpoint on a declaration and nothing works much less the functionality I actually want to add in the pageInit function.

Does anyone have an understanding of why this isn’t working?  

Rookie Asked on April 20, 2020 in SuiteScript.
Add Comment
1 Answer(s)

Do any of the other entry points work (fieldChange is very easy to test).  If they don’t, then you have a path problem to your client script.

Beginner Answered on April 20, 2020.

You can’t add fields to Lists to check for field changes. You can add buttons, columns and rows. (I have a button and my button click function works)

on April 20, 2020.
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