搜索 PO# 字段中包含特定文本/值的记录(id:otherrefnum)

要检索包含 PO# 字段 (id: otherrefnum) 上特定文本/值的子字符串的所有记录,仅使用“nlobjSearchFilter(‘otherrefnum’, null, ‘contains’, text)”似乎不起作用。它返回所有记录,就好像没有应用过滤器一样。 使用“equalto”有效,但这将匹配 PO# 字段中的整个字段值。 解决方案是使用poastext而不是otherrefnum。 请参阅下面的示例代码。

警惕id比较大小存在bug

看到一段代码用id大小比较两条记录的创建时间,结果出现了一些bug。 本意是筛掉38这个情况,但是因为字符串在js中比较大小并不是比较其数字的大小,而是逐字符比较数字的编码大小。 这种情况应该parseInt转换成numeric的类型再比较大小

Print Icon WILL Trigger User Event!

Never thought clicking Print icon on a record to get the pdf WILL fire record’s user event. This is very new to me In this example, when print the record where the user event script like above is deployed to will fire the function getAmountChinese and the field custbody_total_amount_text will become available for the Advanced... » read more

Error Code 406 When Request an OAuth2 Token from External 请求外部的OAuth2令牌得到代码406

In my case, I put Accept type into the request Header and it does work. Code snippet with pseudo data: Welcome to share your situation and solution. For more info about Header https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept 我在http请求的Header中添加了Accept的类型,一切就正常了。 含有瞎编信息的代码如下: 如果你有其它解决方案也可以分享。 关于Header的帮助主题 https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept

SSS_INVALID_SRCH_OPERATOR But Search Is Not Stopped 报SSS_INVALID_SRCH_OPERATOR但是搜索没有被终止

In some scenarios, you may find a search does throw an Invalid Search Operator error but NetSuite executes the search and returns the result. You may just want to let it go as long as it works, but we can make it work flawlessly. 有时候视图会返回一个nlobjSearchFilter包含无效操作者,或语法不正确错误,但是视图还是正常返回了结果。你可能觉得能用就行,但是我们还是可以做更好一点。 It’s very likely that an anyof operator is used but... » read more

MODULE_DOES_NOT_EXIST for Custom SuiteScript Lib

The error could be caused by many problems and I think I just found a niche one. Scope The finding is just for non-AMD situations, where @NAmdConfig is not used and only the routes to the library files are referenced in the define([]) #1 Did you miss .js in the file name? Credit to this... » read more

Customer Payment记录类型UNDEPOSITED FUNDS字段的bug

当用SuiteScript操作customer payment记录的时候,选择isDynamic=true,此时如果输入了科目(account)字段的值,UNDEPOSITED FUNDS就会被取消,然后科目旁边的radio button会被选中。但是当某些逻辑需要反转选项,把account设置为空,UNDEPOSITED FUNDS这个radio button却不会被选中。 这种情况下尝试rec.setValue({fieldId: "undepfunds", value: true})是无效的,会提示You have entered an Invalid Field Value true for the following field: undepfunds 正确的方法是! 这个bug很明显来自SuiteScript不能很好兼容radio button