hello
@bharath64. I forgot to mention that the field should be readonly (inline). in this case for the sublist it should be a list or of static list type. I've attached a code written in 1.0 as a sample.
var form = nlapiCreateForm('sample form');
var txtField = form.addField('custpage_linkfield', 'text', 'sample field');
var linkText = '<a href="https://www.google.com">Sample Link</a>';
txtField.setDisplayType('inline');
txtField.setDefaultValue(linkText);
var sublistData = [
{"text": "Go to Google", "link": "
www.google.com", "id": 1},
{"text": "Go to Yahoo", "link": "
www.yahoo.com", "id": 2},
{"text": "Go to Facebook", "link": "
www.facebook.com", "id": 3}
];
var sublist = form.addSubList('custpage_samplelist', 'list', 'sample sublist');
sublist.addField('id', 'text', 'link id');
sublist.addField('linelink', 'text', 'clickable text');
sublistData.forEach(function (line, i) {
var index = (i + 1);
sublist.setLineItemValue('id', index, line.id);
var lineLink = '<a href="https://' + line.link + '">' + line.text + '</a>';
sublist.setLineItemValue('linelink', index, lineLink);
});
response.writePage(form);