``` {"type":"error.SuiteScriptError","name":"INSUF...
# suitescript
s
Copy code
{
  "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
}
Copy code
/**
 *@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?
r
Does the user have access to the form.html file?