Boban Dragojlovic
10/04/2024, 3:28 PMCeligo AI
10/04/2024, 3:28 PMAI generated answer (using internal Slack threads):Based on the conversations provided, it is possible to connect a client script to an order entry page of the customer portal. You can use the
pageInit
function in a client script to run a script when the page loads.
Here is an example of how you can set a function name on a button using SuiteScript:
javascript
//Suitelet
var urlSuiteLet = url.resolveScript({
scriptId: 'customscript_ns_sl_print_ship_inv',
deploymentId: 'customdeploy_ns_sl_print_ship_inv',
returnExternalUrl: false,
params: {
transactionId: recCurrent.id,
}
});
objForm.addButton({
id: 'custpage_printshipinvoice',
label: 'Print Ship Invoice',
functionName: "window.open('" + urlSuiteLet + "','_blank')"
});
In this example, a button is added to the form, and when clicked, it opens a new window with the URL of the Suitelet. The Suitelet is identified by its script ID and deployment ID, and parameters can be passed to it.
******
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
10/04/2024, 3:28 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832241952
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830227077
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824060559
Celigo AI
10/04/2024, 3:28 PM