Vishal Chaudhari
05/21/2025, 9:55 AMCeligo AI
05/21/2025, 9:55 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems that you are trying to add a button in an advanced PDF template and round the button corners. For rounding the corners, you can use the
corner-radius
property instead of border-radius
as the latter is not supported in BFO which is used by NetSuite. Here is an example:
html
<a href="<https://www.example.com>"
style="display: inline-block;
background-color: #007BFF;
color: white;
padding: 8px 16px;
corner-radius: 6px;
text-decoration: none;
font-weight: bold;
font-size: 12px;">
Click Here
</a>
For adding a button on a sales order that opens up a PDF template suitelet, you can use the form.addButton
method in a User Event Script. Here is an example:
javascript
const beforeLoad = (scriptContext) => {
try{
const recCurrent = scriptContext.newRecord;
const objForm = scriptContext.form;
const stStatus = recCurrent.getValue({
fieldId: 'status'
})
const suiteletURL = url.resolveScript({
scriptId: 'customscript_yoursuiteletid',
deploymentId: 'customdeploy_yoursuiteletdeploymentid',
returnExternalUrl: true
});
if(stStatus === 'Pending Fulfillment'|| stStatus === 'Partially Fulfilled'){
objForm.addButton({
id: 'custpage_printbackorderitems',
label: 'Print BPI',
functionName: 'window.open("' + suiteletURL + '")'
})
}
}catch(error){
log.error({
title: 'Add Suitelet Button',
details: error.message
})
}
}
In the above code, replace 'customscript_yoursuiteletid'
and 'customdeploy_yoursuiteletdeploymentid'
with your actual Suitelet script ID and deployment ID. This will add a button to the sales order when the status is either 'Pending Fulfillment' or 'Partially Fulfilled'. When clicked, it will open the Suitelet in a new window.
******
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
05/21/2025, 9:56 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819151402
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807162046
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803449929
Celigo AI
05/21/2025, 9:56 AM