My Stuff
Comments
-
You can do this in a template with the 'replace' builtin, e.g. [CODE]${record.field?replace('%', '')?replace('-','')}[/CODE] Sorry I have to ask. I've limited trial-and-error time on this and have to throw it out here. There is nothing to apologise for, that's what this forum is for :D
-
Hmm, seems like the 'createdfrom.trandate' field is actually a string, so you do want the '?date' builtin to convert it to date. Though your mistake was trying to put the date format you wanted to output, while ?date requires the date format of the input string. The following should work: [CODE]…
-
Try using ${record@title} instead.
-
The way I ensure consistent rounding of all fields is to first convert all fields to a number and then format with FTL: [PHP]<#function toNumber val> <#if val?has_content && val?length gt 0 > <#return val?html?replace('[^0-9.]','','r')?number > <#else> <#return 0 > </#if> </#function>…
-
The 'date' builtin actually does the opposite of what you are trying (converts a string to date, not date to string) Try: [CODE]<td>${record.createdfrom.trandate?string('mm/dd/yyyy')</td>[/CODE] You can also set this globally for the template: [CODE]<#setting date_format = 'mm/dd/yyyy'>[/CODE]
-
You could do: [CODE]<td>${record.createdfrom.createdfrom?replace('Quote #','')?replace('Devis #', '')}</td>[/CODE] Or using a regular expression, this might be cleaner (untested): [CODE]<td>${record.createdfrom.createdfrom?replace('^.+ #', '', 'r')}</td>[/CODE]
-
This is quite straightforward to do in a Workflow using the 'Set Field Mandatory' action, and using conditions to control when this should be triggered.
-
On a general note is there either a full schema list for the advanced printing templates (other than the add fields button in WYSIWYG which seems to have lots of values not applicable to the specific record you are on) or anyway to print all the information in an object, eg equivalent of console.log record ? Try opening a…
-
Try: [CODE]${item.rate?html?replace('$','')}[/CODE]
-
I'm guessing that as you are not selecting 'Store Value' on the entity custom field, it is not available for sourcing in the transaction custom field. In any event, you can source this directly in the transaction custom field using the formula {entity.id}. If you want this to be shown on new unsaved sales orders as well,…
-
Hi Biggio, That's probably because you need to "double escape" the backslash - try: [CODE]${item.amount?html?replace("^\\w+\\$","","r")}[/CODE] http://stackoverflow.com/questions/20394713/how-to-use-regular-expressions-b-w-in-freemarker
-
You can do this with Advanced PDF/HTML Forms using the <pbr/> tag.
-
They have probably just renamed one of the standard entity types. Have a look under "Setup -> Company -> Rename Records/Transactions".
-
You can do this by checking the 'Global Search' checkbox on the custom field. For more info, see the help topic 'Including Custom Fields in Global Search'. We use the built-in 'otherrefnum' field to store the customer's purchase order number, which by default comes up in global search. Are you already using this field for…
-
Have a look at the Audience tab of the Script Deployment record.
-
One big thing that held me back using SS2.0 was lack of IDE autocomplete ("IntelliSense"). I've since used started using TypeScript with https://github.com/headintheclouddev/typings-suitescript-2.0 which works really nicely, but I've heard from other devs that they would rather not introduce another tool/layer to their…
-
A suitelet that's available without login sounds like a good approach. I would advise adding a custom field to Purchase Orders that is populated with a randomly generated verification token to prevent url tampering. Yes, you can retrieve parameters from the URL the same you would retrieve POST'ed ones.
-
There is no supported way to do that. You could technically manipulate the DOM yourself in a script, but it's not recommended.
-
You could replace the native alert by modifying the window.alert() function, though this approach is by no means recommended. var nativeAlert = window.alert; window.alert = function() { if (arguments[0] === 'No Match.') { var result; do { result = confirm('No Match. Click Cancel to continue.') } while (result); } else {…
-
Here's what we use - works for Australia :-) // https://usergroup.netsuite.com/users/forum/platform-areas/customization/suitescript-custom-code/342881-transaction-custom-address-script-doesn-t-work record.setFieldValue('shipaddresslist',-2); var shipaddr = record.createSubrecord('shippingaddress');…
-
Including an iframe will delay the onload event of the parent page. You could try one of the techniques listed in the link below to defer loading the iframe until the main page done. http://www.aaronpeters.nl/blog/iframe-loading-techniques-performance?%3E
-
Have you tried added the file as a library to your Script Record?
-
Another option for SS1.0 is to use the undocumented internal Netsuite function showAlertBox() in your client side code. showAlertBox('alert_duplicate_record', 'Warning - This record may have duplicate', 'This record may have duplicates.', NLAlertDialog.TYPE_HIGH_PRIORITY);
-
The status of the SO is always pending approval when I inspect it via the debugger This is probably your issue. Have you tried approving the Sales Order before transforming it?
-
Looks good to me! I've had to do something similar before, but I needed the total of unapplied deposits. Here's what I came up with: function checkUnappliedDepositsOnSalesOrder(salesorder) { var unappliedDeposits = 0; var filters = [ new nlobjSearchFilter('type', null, 'anyof', 'CustDep'), new nlobjSearchFilter('status',…
-
Here is an example of doing something like this with DataTables for pagination mos_product_search.js [CODE]/** * Suitelet to make searching for stock codes really easy * * Script Type: Suitelet * */ function getItems() { var columns = ['internalid', 'itemid', 'salesdescription', 'baseprice', 'lastpurchaseprice',…
-
Use the orderstatus field. Here are the codes. (A-H) david.smith I am curious why you would prefer that? The statusref field is more readable, and it's documented in the Records Browser?
-
I ran across another method that seems like it would be bit cleaner. There's an "amountunbilled" field on the SalesOrder that should work. This code snippet seems to be working fairly well. Any reason why this approach wouldn't work? I forgot about that search field, that's probably the best way.
-
A standard alert box in JavaScript cannot include a clickable hyperlink. You have a couple of other options: 1) You can use the new SS2.0 N/ui/dialog module to create a popup box with HTML require(['N/ui/dialog'], function(dialog) { dialog.alert({ title: "Click on the link", message: "<a href='" +…
-
The issue I'm running into is it's possible for some accounts to be configured to bill before shipping, so pendingFulfillment status does not give me a guarantee that the SalesOrder was not billed. You won't catch cases where the Sales Order was only partially billed before fulfillment (you are just checking for the…