域名已变更 请手动修改文章中域名指向carlzeng.com

Bar codes in NetSuite Saved Searches(transport/reprint) 活用NetSuite搜索页面显示可扫描条码

THIS IS A COPY FROM BLOG

Ways of incorporating Bar Codes into your Netsuite Saved Searches. Results.Blog.BarCode.TL
 

Code 39: 


 

Step 1: Load web font file into the file cabinet and set to available without login.
You can use the font file provided or a custom bar code font. AddFontFile.Blog.BarCode.TL You can download the web font file here: Code39.woff (unzip before uploading) 
 
Step 2: In your saved search results add a Formula(Text) field and set the custom label as desired.  
Insert the formula below and update the file URL and the desired field id that you want to encode.
You can modify the font-size to adjust the size of your bar code.
'<style> @font-face { font-family: Code39; src: url( insert file URL here )}</style><div style="font-family:Code39;font-size:48pt;">*'||UPPER({desired field id to encode})||'*</div>'
Example: '<style> @font-face { font-family: Code39; src: url(https://system.na1.netsuite.com/core/media/media.nl?id=5491&c=TSTDRV250785&h=cc810815f230b8f9b31d&_xt=.woff)}</style><div style="font-family:Code39;font-size:48pt;">*'||UPPER({tranid})||'*</div>AddBarCode.Blog.BarCode.TL
 
Step 3: Repeat step 2 for each additional field you would like converted to a bar code. 
NOTE: If you don't have the start and stop characters '*' as provided in the code, then you will get something that looks like a bar code but will not scan.   
 

Code 128: 


 

Code 128 does not allow for simple encoding using only a web font file, Javascript must be used for the encoding.  
There are other solutions available to accomplish the encoding if you prefer a different method. 
Step 1: Load this Javascript file JsBarcode.code128.min.js into Netsuite's file cabinet. 
 
Step 2: So that you don't reload the Javascript code on each line of your search results, I have created the formula below that will only load it once.  This will noticeably reduce the load time for your search results.  Add a Formula (Text) column to the very top of your search results with the formula below, make sure to replace your javascript url with the one shown. decode(rownum, 1, '<script src="https://system.na1.netsuite.com/core/media/media.nl?id=5492&c=TSTDRV250785&h=ae62aeaa7c75cd183ccd&_xt=.js"></script>','') 
 
Step 3: Add a Formula (Text) column that will use the script loaded. Replace the {item.name} with the field you would like to encode. '<svg id="barcode'||rownum||'"></svg><script>JsBarcode("#barcode'||rownum||'", "'||{item.name}||'");</script>' 
 
Step 4: If you would like to have more than one bar code per line you will need to make a small change for each new column added.  Repeat step 3 and add an additional Formula (Text) column but add a number before the two lower case 'barcode' strings. The number should be unique for each newly added column. '<svg id="2barcode'||rownum||'"></svg><script>JsBarcode("#2barcode'||rownum||'", "'||{item.name}||'",{width:1.5,height:30});</script>' Code128.Blog.BarCode.TL  
Limitations: You must use the Print button to either print the bar codes or to save them to PDF.  
The other export options will not render the HTML by default. Limitation.Blog.BarCode.TL
 
 
THIS IS A COPY FROM BLOG
SOURCE URL ADDRESS: http://blog.nxturn.com/bar-codes-in-netsuite-saved-searches
posted @   CarlZeng  阅读(548)  评论(0编辑  收藏  举报
编辑推荐:
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· .NET 适配 HarmonyOS 进展
阅读排行:
· 用 DeepSeek 给对象做个网站,她一定感动坏了
· DeepSeek+PageAssist实现本地大模型联网
· 手把手教你更优雅的享受 DeepSeek
· Java轻量级代码工程
· 从 14 秒到 1 秒:MySQL DDL 性能优化实战
历史上的今天:
2009-01-05 nlapiGetContext 应用与介绍
2009-01-05 c语言数组五种排序法:bubble,choise,quick,insert,shell 和js 数组排序sort的区别
2009-01-05 Js MD5加密问题
2009-01-05 第三方支付接口,银行接口(附下载),third party bank interface
域名已变更 请手动修改文章中域名指向carlzeng.com
点击右上角即可分享
微信分享提示