My Stuff
Comments
-
Hi Michoel, an SDF deployment will invalidate any existing session of the same user. Thanks. So what is the recommended workflow for developing and testing SuiteScripts using SDF? Should I be using two separate user accounts, and deploying for each code test? (Which adds an extra couple seconds between each code…
-
Try changing [CODE]<td align="right">${record.subtotal?string[",##0.00"]}</td>[/CODE] to [CODE]<td align="right">${(record.subtotal * -1)?string[",##0.00"]}</td>[/CODE]
-
Yep, that's right.
-
<pdf> <head> <link name="mycustomfont" type="font" subtype="truetype" src="http://url.to.font/file.ttf" src-italic="http://url.to.font/italic.ttf"/> </head> <body font-family="mytimes" font-size="18"> Hello in an embedded, <i>italic</i> TrueType font </body> </pdf> Have…
-
What I do is in the actual Advanced PDF/HTML Template just have a "stub" file that sources in actual xml file from a URL. <?xml version="1.0"?> <#include "http://url.to.file/template.xml"> The actual template files can be hosted either in your File Cabinet (with Available without Login checked), or on a web…
-
Do you know if NetSuite has fixed it so you can have multiple formulatext or formulanumeric columns in the results and be able to reference the column you want in the PDF template . When I last looked at this your example works great when you resultset only has one formulatext column if your resultset had a second…
-
Mike Kennedy The error is most likely due to the "{" character in your if statements <#if <strong>{</strong>item.custcol_ctp_harmonizecode<strong>}</strong> == 'Canada'> should be <#if item.custcol_ctp_harmonizecode == "Canada"> But there's something else that looks wrong there. If…
-
You can do that with the capitalize built-in: [CODE]<td>${check.totalwords?capitalize}*************************** ******************************************</td>[/CODE]
-
Your code looks pretty spot on to me. I can't see any obvious reason why it would generate only the last record. I would recommend stepping through it in the Script Debugger to see what it's actually doing. Just some small nitpicking on your code, I would move the nlapiLoadFile() outside the loop, and also cut out the…
-
I haven't done exactly this, but I am happy to try help :D
-
You can do this with the Freemarker ?replace built-in using a regular expression: [CODE]${code?replace('^(\\d{4}\\.\\d{2})\\.\\d{4}$', '$1', 'r') }[/CODE]
-
Try td p { font-size: 10pt; }
-
What does the custom_id part of the suitelet doing? That's a parameter that identifies which record should be printed. When you click the button, the Internal ID of the currently viewed record is appended to the url that is accessed - '&custom_id=' + nlapiGetRecordId()` It looks like you are loading a custom .xml file -- I…
-
The auto-escaping feature was only added in version 2.3.24. NetSuite is still using an older version of the library (2.3.19 last I checked) so you need to use the deprecated "escape" directive instead: http://freemarker.org/docs/ref_directive_escape.html With regards to the issue of ?html escaping too much, you can use…
-
I haven't used SuiteScript 2.0 before, only 1.0, so I'm not sure how much different the code would be (or how long it would take me to figure out the structure) to use the TemplateRenderer.setTemplateById() function with 2.0 in order to use an existing advanced html/pdf template. If I just went with 1.0 would it be…
-
That's all correct You need to make sure that the Script ID and Deployment ID matches the Script record for the Suitelet you created "window.open(nlapiResolveURL('SUITELET', 'customscript_mos_itemlabels_sl', 'customdeploy_mos_itemlabels_sl') + '&custom_id=' + nlapiGetRecordId());";…
-
You should be able to do this, see the image below. You would refer to the base price in the template as ${item.custcol_baseprice} Note that you also need to make sure that the Transaction Column Field is checked to display in the UI for it to be available for the template.…
-
https://emergetech.com/how-to-send-multiple-netsuite-invoices-in-one-file/
-
No it's not. Can you clarify what you mean?
-
You could probably filter them out with something like this: [CODE]<#if item.itemtype != "Shipping Item"> <tr> <td align="center" colspan="3" line-height="150%">${item.quantity}</td> <td colspan="12"><span class="itemname">${item.item}</span><br />${item.description}</td> <td colspan="3">${item.options}</td> <td…
-
Also, instead of Netsuite's recommended code, you can use this utility function instead: <#function isNetsuiteTrue field> <#return (field?is_boolean && field) || (field?is_string && field == 'T') > </#function> <#if isNetsuiteTrue(record.field)> ... </#if>
-
Try: <#list record.item as item> <#assign itemQty = <strong>item.quantity?number</strong>> <#list 1..itemQty as x> <#assign rowNum = rowNum +1>
-
JavaScript is case sensitive, you should be using "renderPdf" not renderPDF https://system.netsuite.com/app/help...426014776.html
-
This is absolutely possible. You would basically need two scripts to accomplish this - a User Event script to add the button to form, and a Suitelet to generate the PDF. I've done a similar customization on Item Records, so this should help you get started. /** * Add 'Print Item Labels' button to Item Page * * Script ID:…
-
I still cann't get Back Orders to Work. :h_a_w: The correct field is ${item.quantityremaining}. Is the column visible in the UI?
-
I've been doing this successfully. If you are hosting inside NS, you might still need to make the files "Available Without Login" <!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd"> <pdf> <head> <link src="https://url.to.file.css" type="stylesheet" /> </head> Another…
-
You can do this with "String Slicing" e.g. To get the first three characters of a field, use: [CODE]${record.field[0..3]}[/CODE] FYI, the full reference manual for Freemarker is located at http://freemarker.org/docs/ref.html, and you can view the various functions available for string manipulation at…
-
Try using nlapiPrintRecord('TRANSACTION', '5778', 'HTML') instead of nlapiPrintRecord('TRANSACTION', '5778', 'PDF');
-
This should be possible, though you would most probably have to create a Custom Transaction Column field to source the Item field for it to be available to the template. Also, if you find that the HTML is getting auto escaped, you may need to use the `no_esc` built-in to prevent this.…
-
I sincerely hope there is a better way, but this is the best I could come up with: [CODE]${record.custbody_pf_wndw_img?replace('img src', 'img width="50px" height="50px" src')}[/CODE]