Vishal Chaudhari
06/11/2025, 6:18 AMCeligo AI
06/11/2025, 6:18 AMAI generated answer (using internal Slack threads):To create a custom clickable icon on a line item in a sales order, you can use SuiteScript to create an InlineHTML field that contains an HTML link (href) to the desired record. This can be done in a User Event script or a Client script. Here's a simplified example of how you might do this:
javascript
function userEventBeforeLoad(scriptContext) {
if (scriptContext.type !== scriptContext.UserEventType.VIEW) return;
var currentRecord = scriptContext.newRecord;
var lineCount = currentRecord.getLineCount({sublistId: 'item'});
for (var i = 0; i < lineCount; i++) {
var itemId = currentRecord.getSublistValue({
sublistId: 'item',
fieldId: 'item',
line: i
});
var linkHtml = '<a href="/app/common/item/item.nl?id=' + itemId + '" target="_blank"><img src="/images/icons/messagebox/icon_msgbox_info.png"></a>';
currentRecord.setSublistValue({
sublistId: 'item',
fieldId: 'custcol_custom_link',
line: i,
value: linkHtml
});
}
}
In this example, custcol_custom_link
is a custom InlineHTML field on the line item sublist. The script generates an HTML link for each line item, using the item's internal ID to construct the URL. The link opens in a new tab when clicked.
Please note that this is a simplified example and may need to be adjusted to fit your specific needs. Also, the URL and the icon used in the link may vary depending on your requirements.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/11/2025, 6:18 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.78569895
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.784971
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.784916818
Celigo AI
06/11/2025, 6:18 AM