Skip to content

Instantly share code, notes, and snippets.

@abacijson
abacijson / .html
Created March 25, 2021 12:03
buttonaction.html
<a href=https://tstdrv1030806.app.netsuite.com/app/accounting/transactions/salesordermanager.nl?type=approve&id='||{internalid}||'&whence=>Approve</a>
@abacijson
abacijson / .html
Created March 9, 2021 15:45
ns ss html1
'<a href=https://tstdrv1030806.app.netsuite.com/app/accounting/transactions/estimate.nl?id='||{createdfrom.internalid}||'>View  '||{createdfrom}||'</a>'
@abacijson
abacijson / .sql
Last active March 9, 2021 15:34
ns case statement 1
CASE
WHEN {createdfrom.type} IN ('Quote') THEN
'<a href=https://tstdrv1030806.app.netsuite.com/app/accounting/transactions/estimate.nl?id='||{createdfrom.internalid}||'>View  '||{createdfrom}||'</a>'
WHEN {createdfrom.type} IN ('Opportunity') THEN
'<a href=https://tstdrv1030806.app.netsuite.com/app/accounting/transactions/opprtnty.nl?id='||{createdfrom.internalid}||'>View '||{createdfrom}||'</a>'
END
<td align="center" class="totalboxmid" colspan="2">
${currencyType} ${(record.total+ record.taxtotal + record.shippingcost)?string(",##0.00")}
</td>
<#assign currencyType = '$'>
<#if record.currencysymbol = 'GBP'>
<#assign currencyType = '£'>
</#if>
<#if record.currencysymbol = 'EUR'>
<#assign currencyType = '€'>
</#if>
<#if record.currencysymbol = 'INR'>
<td align="center" class="totalboxmid" colspan="2">
${(record.total+ record.taxtotal + record.shippingcost)?string.currency}
</td>
<td align="center" class="totalboxmid" colspan="2">
${(record.total+ record.taxtotal + record.shippingcost) }
</td>
function afterSubmit(subscriptionContext) {
var newRecordId = subscriptionContext.newRecord.id;
var allocateAction = action.get({
recordType: 'revenuearrangement',
id: 'allocate'
});
allocateAction.execute({recordId: newRecordId});
}
@abacijson
abacijson / emailCaptureSample.js
Created November 23, 2019 01:22
emailCaptureSample.js
/**
* name of the function MUST be process
*/
function process(email)
{
//Print out FROM email address
nlapiLogExecution('debug', 'From Email Address', email.getFrom());
//Print out TO email address
nlapiLogExecution('debug', 'To Email Address', email.getTo());
@abacijson
abacijson / Ss2_0DialogSample.js
Created November 23, 2019 01:20
Ss2_0DialogSample.js
/**
* @NApiVersion 2.x
* @NScriptType ClientScript
* @NModuleScope SameAccount
*/
define(['N/ui/dialog'],
/**
* @param {dialog} dialog
*/
function(dialog) {