This topic contains 3 replies, has 0 voices, and was last updated by egrubaugh 8 years, 4 months ago.
-
AuthorPosts
-
July 15, 2016 at 3:36 pm #6345
cpolanishHi all, I’m having an issue where I added a sublist in a Suitelet that is of type “list”, but only the checkbox field is editable (see attached image). Even via SuiteScript I can only read values, not set values.
Here’s is the code for the sublist:
Code:
// Add Item List
var itemlist = form.addSubList(‘item’, ‘list’, ‘Items’, ‘itemtab’);
itemlist.addField(‘lineid’, ‘integer’, ‘Line Id’).setDisplayType(‘hidden’);
itemlist.addField(‘modify’, ‘checkbox’, ‘Modify’);
itemlist.addField(‘item’, ‘text’, ‘Sku’);
itemlist.addField(‘itemname’, ‘text’, ‘Item’);
itemlist.addField(‘description’, ‘text’, ‘Description’);
itemlist.addField(‘quantity’, ‘integer’, ‘Quantity’);
itemlist.addField(‘rate’, ‘currency’, ‘Price’);
itemlist.addField(‘amount’, ‘currency’, ‘Ext.’);
itemlist.addField(‘requestdate’, ‘date’, ‘Request Date’);itemlist.addMarkAllButtons();
itemlist.addButton(‘updatelines’, ‘Update Lines’, ‘updateLines’);
itemlist.setLineItemValues(getItemList(orderId));
Anybody have any ideas? It seems from looking at the SuiteAnswers articles that it should work, but I can’t seem to get it. I cannot use an inlineeditor sublist as we don’t want people adding or removing lines, only editing what is available to them.Thanks!
~Chris
This is a cached copy. Click here to see the original post. -
July 18, 2016 at 12:54 am #6346
michoelYou should be able to do this with setDisplayType(‘entry’)
Code:
// Add Item List
var itemlist = form.addSubList(‘item’, ‘list’, ‘Items’, ‘itemtab’);
itemlist.addField(‘lineid’, ‘integer’, ‘Line Id’).setDisplayType(‘hidden’);
itemlist.addField(‘modify’, ‘checkbox’, ‘Modify’);
itemlist.addField(‘item’, ‘text’, ‘Sku’);
itemlist.addField(‘itemname’, ‘text’, ‘Item’);
itemlist.addField(‘description’, ‘text’, ‘Description’);
itemlist.addField(‘quantity’, ‘integer’, ‘Quantity’).setDisplayType(‘entry’);
itemlist.addField(‘rate’, ‘currency’, ‘Price’).setDisplayType(‘entry’);
itemlist.addField(‘amount’, ‘currency’, ‘Ext.’);
itemlist.addField(‘requestdate’, ‘date’, ‘Request Date’).setDisplayType(‘entry’);itemlist.addMarkAllButtons();
itemlist.addButton(‘updatelines’, ‘Update Lines’, ‘updateLines’);
itemlist.setLineItemValues(getItemList(orderId)); -
July 18, 2016 at 7:10 am #6347
cpolanishsetDisplayType(‘entry’) seems to do the trick! I guess I don’t do enough sublist work because I was unaware of the “entry” setting. Thanks!
-
July 18, 2016 at 12:34 pm #6348
egrubaughOriginally posted by michoel
View Post
You should be able to do this with setDisplayType(‘entry’)
Very interesting! I was not aware of this type either. Now reading the documentation for nlobjField.setDisplayType, there it is plain as day. Note to self: RTFM
-
AuthorPosts
You must be logged in to reply to this topic.