Hi, ```{"type":"error.SuiteScriptError","name":"S...
# suitescript
r
Hi,
Copy code
{"type":"error.SuiteScriptError","name":"SSS_INVALID_FORM_ELEMENT_NAME","message":"You have entered an invalid form element name. It must be prefixed with \"custpage\", unique, lowercase, and cannot contain any non-alphanumeric characters (except for the underscore character) in order to be added to the form or sublist.","stack":["addField(N/serverWidget)","onRequest(/SuiteScripts/ASSISTANT.js:14)"]
but i have included at custpage at 14, it is a dummy script
b
your id is still invalid
go through the full error message to see all the things that are invalid in ids
there is more to it that the custpage prefix
r
will i get the error if i dont define the step to add the field to? because this is the whole message and its the same
{"type":"error.SuiteScriptError","name":"SSS_INVALID_FORM_ELEMENT_NAME","message":"You have entered an invalid form element name. It must be prefixed with \"custpage\", unique, lowercase, and cannot contain any non-alphanumeric characters (except for the underscore character) in order to be added to the form or sublist.","stack":["addField(N/serverWidget)","onRequest(/SuiteScripts/ASSISTANT.js:28)"],"cause":{"type":"internal error","code":"SSS_INVALID_FORM_ELEMENT_NAME","details":"You have entered an invalid form element name. It must be prefixed with \"custpage\", unique, lowercase, and cannot contain any non-alphanumeric characters (except for the underscore character) in order to be added to the form or sublist.","userEvent":null,"stackTrace":["addField(N/serverWidget)","onRequest(/SuiteScripts/ASSISTANT.js:28)"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":false}
b
what id are you using
r
i have also provided the script snippet just above...
Copy code
var assistant = serverWidget.createAssistant({
      title: 'Simple Assistant',
    });

14th line -->>    assistant.addField({
      id: 'custpage_idnameaddField',
      type: serverWidget.FieldType.TEXT,
      label: 'Sample label addField1',
    });
    assistant.addField({
      id: 'custpage_idnameaddFieldd',
      type: serverWidget.FieldType.TEXT,
      label: 'Sample label addField2',
    });
b
well, i told you the answer already
so its more do you know which id is causing the problem
r
the 14th one, i have also differentiated the id , i dont get what is wrong with my id?
b
the error message identifies 4 rules for ids
which of the 4 does your id satisfy
r
all of them, custpage , unique, lowercase , nothing extra
b
id try again
it does not satisfy all 4
r
okay ill check again
gotcha
thanks
360 Views