jvoigt
jvoigt

Reputation: 442

SuiteScript 2.0 way to refresh a sublist in a client script

I had an old SuiteScript 1.0 script that added any number of rows to a sublist of an Item Fulfillment when a button was pushed. In that script when i was done I was able to call

nlapiRefreshLineItems('recmachcustrecord_contents_sublist');

What that did was refreshed the subtab contents so it would show the up to date list with the new rows added (or removed).

Anyhow it seems that call does not have a 2.0 equivalent. I noticed I could go and refresh the whole page with the browser RELOAD and it would of course show correctly. Any suggestions on any ways to facilitate that updated sublist via scripting?

Upvotes: 1

Views: 1695

Answers (2)

TinMonkey
TinMonkey

Reputation: 1842

The suitescript 1.0 commands are available in window context by default, so you can still call them from within a 2.0 script e.g.window.nlapiRefreshLineItems('recmachcustrecord_contents_sublist');

Upvotes: 0

Sumeet kishore
Sumeet kishore

Reputation: 17

via script you have to write a function and trigger it yourself. You can get the field at pageInit using context.currentRecord.getField and then use the same to setSelectOption

Upvotes: 0

Related Questions