hi all :wave: i'm creating a suitelet form that pr...
# suitescript
l
hi all 👋 i'm creating a suitelet form that prints a sublist. one of the column is sales order id. the type is serverWidget.FieldType.TEXT. what do I use to make the sales order number text clickable hyperlinks? for example, same as the view links.
https://suiteanswers.custhelp.com/app/answers/detail/a_id/44703 the example uses url.resolveDomain. but I get error TypeError: Cannot find function resolveDomain in object
b
what does the code look like
n
This is what i've done previously in a pinch. Create an inline sublist text field Then populate it with the html for links.
Copy code
// sublist field
{
          id: 'custpage_viewdetails',
          type: serverWidget.FieldType.TEXT,
          label: 'View Details',
          display: 'INLINE'
        }

// populate it with the link using <href> tags. 
// String template used to populate the record id.
// you could also dynamically populate the record //type too
list.setSublistValue({
          id: 'custpage_viewdetails',
          line,
          value: `<a href="/app/common/custom/custrecordentry.nl?id=${item.id}&rectype=3697"> ${item.name}</a>`
        });
l
@Nathan L I see. you have href to relative path and system auto fill the domain part? thanks for the example. will try it out.
n
Yeah i did it that way so it would work in sandbox and production without having to change the domains
NetSuite will assume the domain from whatever account youre running the suitelet from
l
worked! 🙏
apartyblob 1