Is it possible to have a hyperlink in a sublist fi...
# suitescript
z
Is it possible to have a hyperlink in a sublist field with the following conditions? 1. Page is a NetSuite-generated form (not a Suitelet) 2. Sublist is custom, put in form via
N.ui.serverWidget.Form.addSublist()
in the User Event script, event entry point
beforeLoad
3. List type is
INLINEEDITOR
4. Sublist fields are (of course) custom, defined via
Sublist.addField()
in the User Event script
beforeLoad
5. Rows are inserted into the sublist using browser-side JavaScript a. Browser-side functionality implemented in Client Script
pageInit
b. Data is retrieved asynchronously via Restlet c. Data is inserted into sublist using
CurrentRecord
API methods
selectNewLine()
,
setCurrentSublistValue()
, and
commitLine()
.
s
URL type is supported in a sublist I believe, did you try that or you trying to built some custom hyperlink with inlinehtml?
z
Yes, URL field type is supported. No error, and documentation confirms it is supported. INLINEHTML is unsupported in sublist. With the URL type of field, the linkText is set when the field is defined: so, the whole column should have the same verbiage for the link (like, "Click me"). Then, when the rows are inserted via the currentRecord APIs, the URL of the link gets set via setCurrentSublistValue(). I am doing all of that, and yet I don't get anything clickable. I tried both of the visible sublist display types: normal entry and "disabled" (which is like non-sublist "inline")—of the many combinations of settings, field definitions, etc. I also tried producing raw HTML <a href="..."> etc. just for fun—of course that does not work.