What’s Bootstrap
Why we use Bootstrap in NetSuite
What’s Bootstrap
Why we use Bootstrap in NetSuite
If you are using the NetSuite customer center or My Account if you are using Ecommerce, you have the ability to post different search results to customers. If you wanted to have a list of items that w…
1. A Customer field (i.e., a custom field of Type List/Record-Customer), so that you can filter the custom record search results by Customer.
2. The “Use Permissions” checkbox must be checked
3. On the Permissions tab, select the Customer Center role(s) that you will assign to your Customer Center users, and give them at least “View” level access.
2. Create a saved search for your custom record type. This saved search can be defined however you want, but it MUST have the following Filter Criteria:
1. “
1. You can enter any text you want for the Label (this is the label that will appear for the custom tab in Customer Center), but MUST select Center = “Customer Center”.
2. Under Content > Categories > Label, you can enter any name you want (this is the label that will appear for the category in your custom tab).
3. Under Content > Portlets > Type, you MUST select Type = “Links” and Show = “Yes”.
4. Under Audience, make sure that the “Select All” checkbox is checked for the Roles list.
5. Save your new Custom Center tab.
2. Navigate to Setup > Customization > Center Tabs, and click on the NAME of the new Custom Center Tab that you just created (do NOT click on the “Edit” link; you want to view the Custom Center Tab that you just created).
1. Under Content > Categories, click on the “Edit” link for the Category that you created.
2. On the Custom Center Category page, select the Link for the saved search that you created in the Common Steps section above (i.e., the saved search that you want to display on Customer Center).
1. IMPORTANT: When you look in the Link list for your saved search, you will find 2 entries for your saved search with similar names. One entry in the list will have “Results” in the name, the other will not have “Results” in the name. (For example, if your saved search is called “Subscription Data”, then you will see one entry in the Link list will be “Subscription Data”, and the second entry will be “Subscription Data Results”.) You MUST select the entry with “Results” in the name. The difference between these two entries is this: the link that does not have “Results” in the name (for example, “Subscription Data”) takes you to the page where you edit the search itself; the link with “Results” in the name (for example, “Subscription Data Results”) takes you to the page that shows the actual search results. Another way to look at this is like this: when you go to look at all of your Saved Searches in your normal NetSuite account, you always see two links next to each search. One link is called “Edit”, which takes you to the page where you define what the search is. The second link is called “Results”, which actually runs the search and takes you to a page that shows the results. The “Subscription Data” link is equivalent to the “Edit” link. The “Subscription Data Results” link is equivalent to the “Results” link.
3. Save your changes to the Custom Center Category.
3. Test this in Customer Center by logging in as one of your customers and verify the following:
1. You should see the new custom tab, category, and link you just created.
1. NOTE: If you don’t see the new tab, category, and/or link, then you should hit CTRL-F5 to reload and re-cache each page in Customer Center so that you are sure that you are looking at the latest versions of the Customer Center pages.
2. When you click on the link, the search results should only display custom records associated with the customer that you are logged in as.
1. The “Display in Web Site” checkbox should be unchecked (so that this new tab only shows up for your Customer Center users, and does not show up as a new tab on your website).
2. Under Roles, the “Select All” checkbox should be unchecked, and you MUST select the Customer Center role(s) that you will assign to your Customer Center users.
3. Save your changes to the new Presentation Tab.
2. Navigate to Lists > Web Site > Categories > New to create a new Site Category where you can put the published saved search. (You could use an existing site category, but for instruction purposes, we’ll create a new site category.) The new Site Category can be set up however you want, but the setup MUST include the following:
1. Subcategory of =
2. The “Display in Web Site” checkbox should be unchecked (so that this new site category only shows up for your Customer Center users, and does not show up on your website).
3. Under Audience > Roles, the “Select All” checkbox should be unchecked, and you MUST select the Customer Center role(s) that you will assign to your Customer Center users.
4. ave your changes to the new Presentation Tab.
3. Navigate to Lists > Web Site > Publish Saved Search > New to create a new Published Saved Search. This Published Saved Search MUST have the following settings:
1. Search =
4. Under Audience > Roles, the “Select All” checkbox should be unchecked, and you MUST select the Customer Center role(s) that you will assign to your Customer Center users.
5. Save your changes to the new Published Saved Search.
4. Test this in Customer Center by logging in as one of your customers and verify the following:
1. You should see the new custom tab, category, and published saved search you just created.
1. NOTE: If you don’t see the new tab, category, and/or published saved search, then you should hit CTRL-F5 to reload and re-cache each page in Customer Center so that you are sure that you are looking at the latest versions of the Customer Center pages.
2. When you click on the link for the published saved search, the search results should only display custom records associated with the customer that you are logged in as.
Steps of setting up SAML SSO. 效果图 # Registry a Identity Provider services in:(Might need purchase) I.e. PingOne, Okta, OneLogin, Oracle, McAfee, Lasso
Steps of setting up SAML SSO.
效果图

# Registry a Identity Provider services in:(Might need purchase)
I.e. PingOne, Okta, OneLogin, Oracle, McAfee, Lasso,OpenAm…etc(Below I will use PingOne as example)
# Connect PingOne to Netsuite
## Add SAML role to above NetSuite user.
## Create and Configure PingOne > Application for NetSuite. See sample in PingOne application page(NetSuite).
### Upload SP meta xml file to PingOne.
## Configure NetSuite SAML Integration. See sample in NetSuite SAML Single Sign On page.
### Upload IDP meta xml file to NetSuite.
# Connect PingOne to Tableau
## Create and Configure PingOne > Application for Tableau. See sample in PingOne application page(Tableau).
### Upload SP meta xml file to PingOne.
## Configure Tableau Setting > Integration.
### Upload IDP meta xml file to Tableau.
# Create Portlet in NetSuite to embed Tableau Dashboard/View page.
# Mapping SAML Single Sign on User (First time procedure)。
Chrome Menu:Window > Extensions >Postman – REST Client0.8.4.10起个标题,有空总结一下一个经验,关于Netsuite integration to Box.com’s CustomisationTwo part: -Customisati…
Chrome Menu:
Window > Extensions > Postman – REST Client 0.8.4.10
起个标题,有空总结一下一个经验,关于Netsuite integration to Box.com’s Customisation
Two part:
– Customisation in Netsuite, SuiteScript
– Customisation on Box, by Calling Box’s restlet API, AJAX calls(command to response)
废话一句:
空间很多,可以容纳很多想法,但是没有产品是完美的。
如何在各种和各方面的Limitation中自由游走才是实践高手的必经之路。 :)
Have a nice day, 73…

Node.js 简练,清爽
如何在IDEA中加入默认/内置函数的auto-completion
IDEA node.js 函数的autocomplete
实现了月初的需求:寻求批量分类解决方案
这下面的代码可以灵活拓展,应用在不同的批量修改编辑磁盘目录下的文件内容。
Node.js源代码如下:
var fs = require("fs");
var buf = new Buffer.alloc(1024);
console.log("查看 _posts 目录");
const strPostDir = "/Users/carlzeng/AppTesting/blog/source/_posts";
var intUpdatedCnt = 0;
fs.readdir(strPostDir, function (err, files) {
if (err) {
return console.error(err);
}
try {
files.forEach(function (file) {
// console.log( file );
// if (file == '0模版.md'){
if (file.toLowerCase().indexOf('netsuite') != -1) {
console.log(file);
//读取文件,并且替换文件中指定的字符串
let replaceFile = function (filePath, sourceRegx, targetStr) {
fs.readFile(filePath, function (err, data) {
if (err) {
return err;
}
let str = data.toString();
// console.info(str);
str = str.replace(sourceRegx, targetStr);
// console.info("AFTER: n" + str);
fs.writeFile(filePath, str, function (err) {
if (err) return err;
});
});
}
replaceFile(strPostDir + '/' + file, /tags: []/, "tags: [NetSuite] ncategories: NetSuite")
intUpdatedCnt++;
if (intUpdatedCnt == 2000)
throw new Error("EndIterative");
}
});
} catch (e) {
if (e.message != "EndIterative") throw e;
}
});
Sublime Text 编辑器 打开文件夹目录,它便会加载这个文件夹下的所有文件,(用这种方式更新文章,非常便捷)
然后使用菜单“查找 》 替换”来搜索特定的特征的字符串.
搜索内容,也是支持正则表达
Git clone
用IDE编辑器(比如:WebStorm)git clone下来
打开IDE,Terminal Tab会自动切换到clone下来的当前nodejs目录
npm install
[可选]npx vite build
可直接编辑Node JS代码
网络环境的情况下npm命令前面可能需要爬墙:
shell
HTTPS_PROXY="http://127.0.0.1:7890"
“`shell
#On MacOS or Linux, run the app with this command:
DEBUG=myapp:* npm start
#On Windows Command Prompt, use this command:
set DEBUG=myapp:* & npm start
“`
编译到当前项目的dist目录中: npm run build
详细步骤见
docker build -t ipserver .
运行 npm run build 后提示报错
npm warn cli npm v11.0.0 does not support Node.js v20.10.0. This version of npm supports the following node versions: `^20.17.0 || >=22.9.0`. You can find the latest version at https://nodejs.org/.
11.0.0
升级
npm install -g npm
npm warn cli npm v11.0.0 does not support Node.js v20.10.0. This version of npm supports the following node versions: `^20.17.0 || >=22.9.0`. You can find the latest version at https://nodejs.org/.
npm error code EACCES
npm error syscall rename
npm error path /usr/local/lib/node_modules/npm
npm error dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm error errno -13
npm error [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm error errno: -13,
npm error code: 'EACCES',
npm error syscall: 'rename',
npm error path: '/usr/local/lib/node_modules/npm',
npm error dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /Users/carlzeng/.npm/_logs/2025-02-04T00_15_58_385Z-debug-0.log
切换到sudo -i 管理员用户, 重新尝试更新
HTTPS_PROXY=”socks5://127.0.0.1:7890″ npm update -g
https://bun.sh/
Bun is a fast JavaScript
all-in-one toolkit
Develop, test, run, and bundle JavaScript & TypeScript projects—all with Bun. Bun is an all-in-one JavaScript runtime & toolkit designed for speed, complete with a bundler, test runner, and Node.js-compatible package manager. Bun aims for 100% Node.js compatibility.
curl -fsSL https://bun.sh/install | bash
//如果下载失败就换成(前提是您有可以*墙的环境)
HTTPS_PROXY="socks5://127.0.0.1:7890" curl -fsSL https://bun.sh/install | bash
//还是失败, 就换成:
HTTPS_PROXY="socks5://127.0.0.1:7890" curl -fsSL https://bun.sh/install | HTTPS_PROXY="socks5://127.0.0.1:7890" bash
运行成功了, 但是环境没有配置好
bun
dyld[968]: Symbol not found: _ubrk_clone
Referenced from: /Users/carlzeng/.bun/bin/bun
Expected in: /usr/lib/libicucore.A.dylib
zsh: abort bun
目前完还不会打一整个docker的包,先搞一个Node.js的Docker容器,方便管理
version: "3"
services:
node:
stdin_open: true
tty: true
container_name: nodejs
restart: always
volumes:
- './app:/home/app'
ports:
- 3001:3000
image: node
command: bash
本小节思路来源:Mac上安装Node.js的Docker容器
疑问:如何让这个node常驻在后台执行,意思是:当按键control+c退出当前docker exec -it nodejs bash时,不要退出这个进程。
实测:Adding full text Search via FlexSearch to a Blog
起步:https://expressjs.com/en/starter/installing.html
mkdir blogsearch
cd blogsearch
npm init
entry point: (index.js) server.js
HTTPS_PROXY="http://127.0.0.1:7890" npm install express
added 62 packages, and audited 63 packages in 10s
HTTPS_PROXY="http://127.0.0.1:7890" npm install --save flexsearch
added 1 package, and audited 64 packages in 3s
const { Index, Document, Worker } = require("flexsearch");
const index = new Index();
思路来源:Adding full text Search via FlexSearch to a Blog
备注: 本地node程序的测试方式为:
Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight
and efficient. The Node.js package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
Instructions for running Node program on Windows server
Download node https://nodejs.org/en/download/
Create code, I.e.
console.log('hello world');
Go to folder via command line
node start.js
var requirejs = require(“requirejs”); var argv = require(“minimist”)(process.argv.slice(2));
requirejs.config({nodeRequire: require });
requirejs([“fs”, “mkdirp”, “path”, “colors”,”./Constants”], function (fs, mkdirp, path, colors, constants){ “use strict”; function printHelp() {
console.log(“User Commands: nn”.gray);
} if (argv.help || argv.h || Object.keys(argv).length===1) {
printHelp(); return; } if (argv.email || argv.e) {
constants.email = (argv.email) ? (argv.email) : (argv.e);
} else {
console.log (“email argument is required.”); return;
} var sm = new Soap();
});
Login and SSOLogin are very similar XML. The function below returns the cookie header array. // login to the NS web service using the ssoLogin token // return the Set-Cookie header for subsequent requests because it contains the JSESSIONID
function sso_login(ws_url, ws_token)
{ var account = nlapiGetContext().getCompany(); var ret_val = null; var headers = {};
headers[‘Content-Type’]= ‘application/soap+xml’;
headers[‘SOAPAction’] = ‘ssoLogin’; var sso_login_xml = ‘
‘
‘
‘
‘
‘
‘
‘
‘
‘
‘
ret_val = login_response.getHeaders(‘Set-Cookie’);
nlapiLogExecution(‘DEBUG’, ‘cookies returned’, join_cookies(ret_val)); if(g_Devmode){ var hdrs = login_response.getAllHeaders(); for (var i=0; i<hdrs.length; i++){
nlapiLogExecution(‘DEBUG’, hdrs[i] , login_response.getHeader(hdrs[i]));
}
}
} return ret_val;
} // Call API — pass in the cookie array set_cookie
function call_ws(xml, soap_action, sUrl, set_cookie){ //Setting up Headers
var headers = new Array();
headers[‘User-Agent-x’] = ‘SuiteScript-Call’;
headers[‘Content-Type’]= ‘application/soap+xml’;
headers[‘SOAPAction’] = soap_action; if (set_cookie){
headers[‘Cookie’] = join_cookies(set_cookie);
} var resp = nlapiRequestURL( url, xml , headers ); return resp.getBody();
} // assemble array for header to send back with next request
function join_cookies(cookie){ var joined = cookie[0]; for(var _i = 1;_i < cookie.length;_i++){
joined += “, ” + cookie[_i];
} return joined;
}
Instructions for running node program for on a Windows server
1. Download node https://nodejs.org/en/download/
2. Create code
3. Go to folder via command line
4. npm install
5. node start.js –email=
Note:
After Install node-v6.10.0.pkg, you will see:
Node.js was installed at /usr/local/bin/node
npm was installed at /usr/local/bin/npm
Make sure that /usr/local/bin is in your $PATH.
销售订单审核自动发送邮件问题:销售订单界面有“提交审核”按钮,点击提交后会自动发送邮件给审核人,这个审核人可以实现指定发送给销售团队中的“主要”成员吗?Options- 在邮件系统中, 定义那个salesperson的email为一个group的email地址, 这样NS发送一份邮件到这个特殊的邮箱…
销售订单审核自动发送邮件问题:
销售订单界面有“提交审核”按钮,点击提交后会自动发送邮件给审核人,这个审核人可以实现指定发送给销售团队中的“主要”成员吗?
Options
– 在邮件系统中, 定义那个salesperson的email为一个group的email地址, 这样NS发送一份邮件到这个特殊的邮箱地址, 邮件系统自动会发送给一个销售组的人员.
— 配置这个销售团队中的“主要”成员,在邮件系统中完成, 与NS无关.
– 启用NS中的销售团队功能, Setup > Company > Enable Features > CRM > Sales
— Check this box to assign sales teams to transactions and customers.
Team Selling allows you to calculate split commission for multiple sales reps on a transaction. Field ID: teamselling
订单审核以后编辑流程的问题:
销售订单和采购订单,目前是只有财务开单后才锁定,我们现在的想法是做到主管审核后销售代表就再无权限更改,只有主管才可以修改,财务开单后锁定,希望您能给出更好的建议。
Options:
– Setup > Accounting Preferences > Order Management > REQUIRE RE-APPROVAL ON EDIT OF SALES ORDER
— Check this box to require re-approval when someone edits a sales order that was previously approved.
Note: If you edit a sales order while using a role with permission to approve sales orders, a sales order status is not set to the Pending Approval status.
Note: Partially fulfilled sales orders are not affected by this preference. Once a sales order is partially fulfilled, the status cannot be changed back to pending approval.
Field ID: REAPPROVESOONEDIT
MENU: Transactions > Financial > Revalue Open Currency Balances 使用频率: – 每个月月底,结账前, 手工操作。 – 或者在Period Close Checklist会有一步需要操作:Revalue Open Foreign Curr
MENU:
Transactions > Financial > Revalue Open Currency Balances
使用频率:
– 每个月月底,结账前, 手工操作。
– 或者在Period Close Checklist会有一步需要操作:Revalue Open Foreign Currency Balances
Note:
– 页面Month End Currency Revaluation,每个Subsidiary都要做,在列表下面系统会列出所有等待有可能存在交易外币金额的科目
– 下个月,月初第一天,系统会自动reaver回去GL impact。
原则:
为了更准确的反应每个月由于汇率变化而发生的财务费用,我们在做外币评估的时候,当前评估产生的财务费用相应的会在下期冲回,这样每个月实现的汇兑损益都是上月与当月汇率变动而产生的财务费用。(reference:http://blog.sina.com.cn/s/blog_5127d7ca0100qltm.html)
Netsuite处理:
The NEW revaluation engine makes 2 postings: one at the end of the month and one at the beginning of the month that reverses the first one, so the changes is not permanent (thus we call it Unrealized Gain/Loss).
The new revaluation engine is designed to have the foreign exchange gains/losses posted to the bank accounts as unrealized gains/losses, which get auto-reversed in the beginning of next period.
Bank accounts hold a “running balance”, which is the accumulative effect of all historical transactions. Since there are FX gains/losses, it’s very hard to have a condition when both foreign currency balance and base currency balance equal to zero at the same time.
下一期打算写写两个Deferral
– Deferred Expense
– Deferred Revenue
这个在具体做项目的时候,折磨了我一段时间,现在似乎还在困惑中,不同的公司操作会和使用可能很不一样,看具体行业吧。
Employee Record Name 维护规则 – 在NS系统设计中,默认的Field展现是:First Name, Middle Name, Last Name – 在General Preferences(Setup > Company > Genernal Prefrences)中,影响员
Employee Record Name 维护规则
– 在NS系统设计中,默认的Field展现是:First Name, Middle Name, Last Name
– 在General Preferences(Setup > Company > Genernal Prefrences)中,影响员工姓名展示的参数为:USE LAST NAME FIRST FOR EMPLOYEES
— Check this box to order employee lists by last names.
This lists employees alphabetically by their last names instead of their first names.
Field ID: LASTNAMEFIRST
— 在Help中的信息为:Check this box to list employees by last name first for tax and payroll purposes.
— 实际上国内客户能影响到的就是Employee list的展示问题,I.e. https://system.netsuite.com/app/common/entity/employeelist.nl?whence=
– 为了实现维护和展示的国内Employee和国外Employee的name都make sense:
– 可维护成:
First Name:Lisa 陈某某
Middle Name:
Last Name:Chen,
这样配合设置checked-on = USE LAST NAME FIRST FOR EMPLOYEES;就会得到完美结果:
Chen, Lisa 陈某某 (这个展示是可以完美被中西方都接受和容易读懂的)
– 国内的Employee (举例)
First Name:某某
Middle Name:
Last Name:李,
得到结果:李, 某某(跨国公司, 外资企业的prefer)或者维护出结果:李某某(国内大陆公司的prefer)。
Netsuite 2009.1 itemtype 列表注:大部分的交易类型单据都会关联列支段 itemtype。所有类型的情况列表总结如下:PaymentOthChargeInvtPartMarkup
Netsuite 2009.1 itemtype 列表
注:大部分的交易类型单据都会关联列支段 itemtype。
所有类型的情况列表总结如下:
Payment
OthCharge
InvtPart
Markup