superkumario64
06/08/2018, 9:55 PM{
"type": "error.SuiteScriptError",
"name": "INSUFFICIENT_PERMISSION",
"message": "You do not have privileges to perform this operation",
"stack": [
"createForm(N/serverWidget)",
"render(/SuiteScripts/repo/portlets/react.js:13)"
],
"cause": {
"type": "internal error",
"code": "INSUFFICIENT_PERMISSION",
"details": "You do not have privileges to perform this operation",
"userEvent": null,
"stackTrace": [
"createForm(N/serverWidget)",
"render(/SuiteScripts/repo/portlets/react.js:13)"
],
"notifyOff": false
},
"id": "",
"notifyOff": false
}
/**
*@NApiVersion 2.x
*@NScriptType Portlet
*/
define(['N/file', 'N/ui/serverWidget'],
function(file, ui) {
function render(params) {
//params.portlet.title = 'JS Test';
//params.portlet.clientScriptModulePath = '/SuiteScripts/repo/portlets/main.js';
var htmlFile = file.load({ id: '/SuiteScripts/repo/portlets/form.html' });
var htmlStr = htmlFile.getContents();
var form = ui.createForm({
title : 'Advanced Searching'
});
var html = form.addField({
id : 'textfield',
type : ui.FieldType.INLINEHTML,
label : 'HTML Search'
});
html.defaultValue = htmlStr;
return form;
}
return {
render: render
};
});
@erictgrubaugh am I rendering this correctly?rustyshackles
06/12/2018, 10:07 PM