This topic contains 1 reply, has 0 voices, and was last updated by jmacdonald 7 years, 2 months ago.
-
AuthorPosts
-
September 4, 2017 at 5:12 am #18208
Vesku1980Hi,
I’m having an issue with adding an inlinehtml field as sublist field.
On header level it is going without problems.
My Code (part of it) :
define([‘N/ui/serverWidget’, ‘N/search’, ‘N/email’, ‘N/runtime’, ‘N/record’, ‘N/log’,’./moment.min’],
function(ui, search, email, runtime, record, logger, moment) {
function onRequest(context) {
if (context.request.method === ‘GET’) {
var form = ui.createForm({
title: ‘Suitelet page’
});
var company = form.addField({
id: ‘custpage_company’,
type: ui.FieldType.SELECT,
label: ‘Company’,
source: ‘Subsidiary’
});
var editPage = form.addField({
id: ‘custpage_edit_html’,
type: ui.FieldType.INLINEHTML,
label: ‘INLINEHTML’
})
var sublist1 = form.addSublist({
id: ‘sublist’,
type: ui.SublistType.INLINEEDITOR,
label: ‘Production Status’
});
});
var subsiDiary = sublist1.addField({
id: ‘subsidiary’,
type: ui.FieldType.SELECT,
label: ‘Subsidiary’,
source: ‘Subsidiary’
});
subsiDiary.updateDisplayType({
displayType : ui.FieldDisplayType.DISABLED
});
var editRow = sublist1.addField({
id: ‘custpage_edit_html_row’,
type: ui.FieldType.INLINEHTML,
label: ‘INLINEHTML’
})
context.response.writePage(form);
} else {
}
var scriptObj = runtime.getCurrentScript();
log.audit({title: ‘Audit Entry’, details:”Remaining governance units END:: ” + scriptObj.getRemainingUsage()});
}
return {
onRequest: onRequest
};
ERROR message i’m having : Notice (SuiteScript)
{“type”:”error.SuiteScriptError”,”name”:”SSS_INVAL ID_TYPE_ARG”,”message”:”You have entered an invalid type argument: INLINEHTML”,”stack”:[“addField(N/serverWidget)”,”onRequest(/SuiteScripts/Mepco/aes_capacityreport_SLT.js:142)”],”cause”:{“type”:”internal error”,”code”:”SSS_INVALID_TYPE_ARG”,”details”:”Yo u have entered an invalid type argument: INLINEHTML”,”userEvent”:null,”stackTrace”:[“addField(N/serverWidget)”,”onRequest(/SuiteScripts/Mepco/aes_capacityreport_SLT.js:142)”],”notifyOff”:false},”id”:””,”notifyOff”:false}
Any ideas anyone?
โโโโโโโVesku
This is a cached copy. Click here to see the original post. -
September 5, 2017 at 3:14 am #18209
jmacdonaldWhen I have done this before I think I made the type of the field a text field and then updated the display type to make it inline. Please see this example:
Code:
var contractField = contractSublist.addField({
id: ‘custpage_contract’,
label: ‘Contract’,
type: serverWidget.FieldType.TEXT
});contractField.updateDisplayType({
displayType : serverWidget.FieldDisplayType.INLINE
}); -
AuthorPosts
You must be logged in to reply to this topic.