NetSuite全功能介绍 totemsuite netsuite开发模块-CarlZeng

CRM 自动化销售 n 区域跟踪和分配任务 Territory Tracking and Assignment n 销售线索路径 Lead Routing n 机会管理 n 报价单生成 n 销售订单输入 n 向上销售经理 n 离线销售 n 高级预测 n 电子…

CRM

自动化销售

n

区域跟踪和分配任务

Territory Tracking and Assignment

n

销售线索路径

Lead Routing

n

机会管理

n

报价单生成

n

销售订单输入

n

向上销售经理

n

离线销售

n

高级预测

n

电子邮件与邮件合并

n

采购历史记录

n

客户支持历史记录

n

销售工具发布

n

销售可能性跟踪

n

实时佣金报告

n

交易逾期提醒

n

灵活的佣金日程

n

分层次佣金

n

实时信用卡授权

n

预测和配额管理

n

竞争对手跟踪

n

团队销售

市场自动化

n

群发邮件

n

电话销售管理

n

打印管理

n

直邮管理

n

活动创意文件夹

n

向上销售活动向导

n

个性化信息

n

替代标签功能

n

活动日程安排

n

活动投资回报报告

n

优惠券和越区销售

n

可定制的在线线索表格

n

参照和促销代码跟踪

n

活动跟踪

n

线索来源管理

n

e-mail活动市场管理

n

由采购历史记录产生目标群体

客户支持管理

n

案例管理中心

n

按照产品跟踪案例

n

优先跟踪

n

灵活的队列管理

n

任务分配

n

E-MAIL案例捕捉和建立

n

在线自我服务

n

上报和通告功能

n

自动上报功能

n

按照产品和服务跟踪案例

n

在线客户服务中心

n

知识库

n

基于案例的计费时间跟踪

n

问题管理

合作伙伴关系管理

n

订单录入

n

合作伙伴行动报告

n

客户案例查看

n

协同销售线索管理

n

实时库存访问

n

奖励折扣

n

市场活动发布

实时仪表盘

n

高官和基于角色的仪表板

n

可发布的版面

n

个性化拖放

n

关键绩效指标

n

快速搜索

n

图表和列表报告快照

n

从零自定义快照

n

RSS内容种子

n

可排期的和按需获取的仪表盘警报

n

客户仪表盘

n

KPI计分表

效能工具

n

分组日历

n

记录的导入导出

n

Outlook与Plam的同步

n

任何时间与地点Web接入

n

高官仪表盘和关键指标

n

客户记录

n

拼写检查

n

重复记录坚持和合并

n

延期约会

n

可定制的报表

n

文件夹

n

提醒功能

客户自定义

n

无编码配置

n

功能配置

n

用户特权

n

实时仪表盘

n

客户的记录和表格

n

术语管理

n

自定义编码

n

客户域

n

客户保存搜索

n

下拉式列表

n

表格

n

可定制角色

n

可定制仪表盘

n

网点开发工具

n

报告的发布和接受

n

分析可变的输入

n

改进的可定制域的URL

ERP

财务

n

总账

n

多层帐户图表

n

财务报告

n

应付帐户,多币种

n

应收帐户,多币种

n

薪金,直接存款

n

多重预算

n

高级计费

n

收入确认

n

公认会计准测报告

n

分摊

n

多层帐户图表

n

支票打印

n

网上银行

n

帐单支付

n

更新税收

n

可定制帐户图表

n

保留的分类帐科目

n

会计周期

n

信用卡地址校验

n

存储的交易事务

n

老化期

n

卖方EFT支付

n

高级项目会计

n

分期偿付安排

库存管理

n

特定成本

n

产品包

n

产品图片

n

定价规则

n

库存调整的审计跟踪

n

库存补充预警

n

多地点库存

n

多重计量单位

n

包,配件

n

平均法, LIFO, FIFO 成本计算方式

n

产品的不同价格水平管理

n

首选供货商纪录

n

批量管理

n

条码

n

截止日期

n

按序列号管理

n

库存产品矩阵

n

再定购点跟踪和通知

n

库存盘点

n

货柜管理

n

到岸成本

n

按需求补充库存

采购

n

倒序计划

n

采购历史

n

特殊顺序P.O.S.

n

审批路径

n

部分收据跟踪

n

申购

n

采购订单

n

购买请求跟踪

n

收货处理

n

应付帐款

订单执行

n

多收货地址

n

多方支付

n

分客户跟踪

n

折扣计算

n

销售税

n

批量订单审批

n

部分出货处理

n

订单推迟

n

为客户进行订单跟踪

n

报价/估价

n

订单处理

n

可接受订单量

n

承诺库存

n

定价与折扣

n

销售税

n

信用卡授权

n

配送/包装/运输

n

直送发货

n

特殊订单的采购订单

n

联邦航运发运整合

n

UPS航运发运整合

n

退货

雇员管理

n

时间与费用输入和报告

n

远程时间输入

n

整合案例管理

n

HR 发布

n

日程安排和任务管理

n

员工记录

n

薪金,直接存款

n

费用报告

n

时间,费用,支付审批流程

n

提醒

客户/供应商中心

n

订单历史

n

交运追踪

n

退货订单

n

更新档案

n

支付发票

n

在线自助服务

其他

n

CSV导入/导出

n

总在线的审计追踪

n

用户特权

n

数据导出

n

全面的在线帮助

n

多用户选项

n

免费会计师

n

公司合并

电子商务

网店

n

特价

n

消费者特殊定价

n

库存整合

n

定购和按期支付

n

批量定价更新

n

优待券处理

n

Paypal支付整合

n

信用卡在线处理

n

交叉销售

n

购物车

n

多货币购物车和结帐

n

消费者结帐单据

n

单据销售

n

订单确认

n

多种交运方式

n

税金计算

n

活动编码捕捉

n

促销URL

n

电子文件/软件下载

n

自动向上销售推荐

n

礼品认证

n

折扣和产品优惠券

网站

n

网站托管

n

多域名托管

n

域名

n

多域名路径

n

支持Meta标签

n

页面Meta标签

n

发布动态列表

n

高级网站建设

n

在线表格

n

多语言站点

网站分析

n

访客点击流量分析

n

访客页面浏览分析

n

提交URL ROI报告

n

搜索术语ROI报告

n

站点活跃程度

n

购物车放弃分析

客户管理

n

客户自服务

n

访问知识库

n

客户帐单支付

n

订单生成客户email

n

客户历史交易记录

n

在线案例表格

表格和发布

n

案例

n

线索

n

客户

n

企业内网

n

互联网

网店开发工具包

n

购物车和产品

n

整合

n

密码保护的客户中心

n

经由XML传送数据

n

销售线索,客户信息,案例等在线表格

n

完全自定义的HTML 在线表格

n

在线销售线索获取的E-MAIL通知

n

自动在线线索路径规则和流程

报表

n

实时仪表盘

n

百余个标准报表

n

可定制报表

n

可保存搜索

n

报告输出

n

高级分析

n

关键业务指标快照

n

报告共享控制

开发商可以在NetSuite中定制,扩展

并建立软件

  • 为精确的行业需求定制功能和业务流程
  • 建立并销售完整的新业务流程
  • 建立并销售完整的垂直软件

SuiteBuilder
通过简单应用及指向点击工具来完成个性化配置NetSuit

SuiteScript
建立新的功能、处理业务流程及整个软件,并将其托管到NetSuite中。

SuiteTalk
将NetSuite无缝扩展到原有系统及第三方垂直软件中。

SuiteScipt D-Bug
实时校验写入NS-BOS平台中的编码和元数据。

NetSuite 数据分析 ODBC(SuiteAnalytics Connect) 和 新的Analytics Warehouse-CarlZeng

背景

本文主要分享概念层面上的关于:NetSuite在ODBC上面的功能和演变。

Add-On模块 功能与收费情况

1. ODBC, JDBC and ADO.NET 这三个对应SuiteAnalytics Connect功能;免费

它有较长时间的发展历史和版本迭代,具体详见附录或Help中Connect Service Notifications(URL:这里是你NetSuite的AccountID.app.netsuite.com/app/help/helpcenter.nl?fid=chapter_1530646443.html)

2. NetSuite Analytics Warehouse Connector 对应 NetSuite Analytics Warehouse功能;额外收费

新增在大约Version2021.2左右;更接近底层数据库;数据内容更丰富,开放度更高

它与Netsuite底层是两个构架,一个趋势,和大数据、数据库仓库方向的Oracle实现方式。

The NetSuite2.com data source uses a different schema than NetSuite.com. Some record types and fields that were available in NetSuite.com may not be available in NetSuite2.com, or may return different results. To understand how data is structured in NetSuite2.com and the differences between NetSuite.com and NetSuite2.com

什么是ODBC, JDBC 或 ADO.NET?

ODBC:

加载/获取部分受支持的NetSuite数据到Excel中,比如transactions,entity表,等等。
  09年的时候,我举过一个应用的实例:sql读取csv和xls格式的文件,数据源
  然后通过这种方式可以在不同的CSV或者excel文件间互相调用数据,当然理论上也可以通过此方式将数据导入到mysql等等数据库中。

Use the SuiteAnalytics Connect ODBC driver to load your NetSuite data to Microsoft Excel workbooks.

Open Database Connectivity: What Is ODBC?

[

](https://www.netsuite.com/portal/resource/articles/data-warehouse/open-database-connectivity-odbc.shtml)JDBC:
通过JDBC驱动和API来加载/获取部分受支持的NetSuite数据到JAVA应用程序中。

Installing a Connect JDBC driver enables you to connect a Java application to the Connect Service. The Connect JDBC driver is a database driver implementation that enables you to use JDBC API to communicate with the SuiteAnalytics Connect service, use the Connect for JDBC driver when writing your own application

ADO.NET:
通过ADO.NET驱动和API来加载/获取部分受支持的NetSuite数据到.NET应用程序中。

ADO.NET data provider enables you to access the Connect Service from the Microsoft .NET platform

如何开启ODBC, JDBC 或 ADO.NET?

To enable the SuiteAnalytics feature: 1. Go to Setup > Company > Enable Features. 2. On the *Analytics* subtab, in the Data Management section, enable *SuiteAnalytics Connect*. 3. Click the Save button.

附录

Connect-Service-Notifications

Changes in 2023

Changes in 2022

Changes in 2021

Changes in 2020

Changes in 2019

Changes in 2018

NetSuite merge PDF in SuiteScript 2.0 [in-progress]-CarlZeng

An example below shows the how PDF files are being merged using tag. For compiled PDF files to be merged, use the src property of pdf.

var xmlF = ‘<?xml version=”1.0″?>

’;
xmlF += ‘’;

xmlF += ‘‘;
xmlF = xmlF.replace(/&(?!amp;)/g, ‘&’);
var file = render.xmlToPdf({ xmlString: xmlF });
file.save();

Sample2:

var arrayWithUrls = [“/core/media/media.nl?id=theid&c=myaccoutn&h=1122&_xt=.pdf”, “/core/media/media.nl?id=theid&c=myaccount&h=2233&_xt=.pdf”] var xml = “<?xml version=””1.0″”?>n<!DOCTYPE pdf PUBLIC “”-//big.faceless.org//report”” “”report-1.1.dtd””>n” xml += “” xml += “nn

Merged PDF

n” xml += “

” xml += “Document body” xml += “n” arrayWithUrls.map(function (x) { var cleanPdfURL = mxml.escape({
xmlText: x
});
xml += ‘‘ })
xml += ““

https://medium.com/@morrisdev/append-multiple-pdf-documents-in-netsuite-suitescripts-6542396a2343

NetSuite generated bank files and the Bank Reconciliation process-CarlZeng

NetSuite generated bank files and the Bank Reconciliation process

Electronic Bank Payments

https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSEBP/NSEBP.pdf

Creating a New Custom Payment File Template

In the Payment File Type field, select one of the following:
■ EFT – for vendor payments and customer refunds
■ DD – for customer payments
■ Positive Pay – for creating Positive Pay files

In the Bank File Template field, enter the template body using FreeMarker syntax. If the SuiteTax feature is provisioned in your account, enter the template body in the SuiteTax Bank File Template field

Template Sample:

OUTPUT START

Legal Name: **${cbank.custrecord_2663_legal_name}

Immediate Origin: **${cbank.custpage_eft_custrecord_2663_bank_comp_id}

Reference Note: **${pfa.custrecord_2663_ref_note}

OUTPUT END

Including Fields from NetSuite Search Results in Advanced Templates

NetSuite search result columns can be accessed in payment files using the . notation.

OUTPUT START# <#list payments as payment>

<#assign entity = entities[payment_index] >

<#assign ebank = ebanks[payment_index] >

*** Amount: ${payment.amount}

Address: ${entity.billaddress1}

Bank Num: ${ebank. custrecord_2663_entity_bank_no} ***

#OUTPUT END#

Note that the variable names for single payment, single entity, and single entity bank use the single result keyword.

FreeMarker Template Library for Electronic Bank Payments


1. NetSuite Electronic Bank Payments Bundle | Sikich LLP

https://www.youtube.com/watch?v=JOE4EXxkTFk


2. Import online banking data and statement functions in NetSuite

https://rsmus.com/what-we-do/services/technology/resources/netsuite-resource-center/netsuite-tips-tricks/import-online-banking-data-and-statement-functions-in-netsuite.html


3. How to Generate Standard NACHA File for Vendor Payments

http://blog.concentrus.com/how-to-generate-standard-nache-file-for-vendor-payments

  1. Install Electronic Bank Payments bundle (Bundle ID 308852)
  2. Set up Bank Details

    1. https://netsuite.custhelp.com/app/answers/detail/a_id/21798/kw/bank%20detail
    2. Notes:Set up approval workflow : https://netsuite.custhelp.com/app/answers/detail/a_id/34998
  3. Set up Vendor records for Electronic Payment

    1. https://netsuite.custhelp.com/app/answers/detail/a_id/21801/kw/Vendor%20bank%20payment%20detail

      Notes:Make sure set up the Default AP Account on the Vendor record:
      Go to Employee –  Financial — Account Information – Default Payables Account
      2. You can also use CSV Import to create new Bank Detail records:   https://netsuite.custhelp.com/app/answers/detail/a_id/27012/kw/csv%20bank%20detail
       Tips:The Record Type is called “Bank Detail” (“Entity Bank Detail” is incorrectly called out in the instructions)
      4. Generate NACHA file for Vendor Payments
      1. 1. https://netsuite.custhelp.com/app/answers/detail/a_id/21773
      2. Notes:
      1. Bills will be marked paid once electronic payments are approved and processed
      2. Date to be Processed choose the next day if you are loading the file today
      3. Make sure Vendor’s default Payables account is the same as the EFT Bank Details set up. See step #3 above.
      4. Make sure Bill is approved if you don’t see it on the list
      5. Uncheck Aggregate by Payee to create separate payment transactions

  4. Approval Workflow

    1. Approver will be emailed notification that approval is needed OR
    2. Where to check for approvals: Payments — Payment Processing — Bill Payment Batches
    1. Find your batch
    2. Click Edit
    3. Save and Approve or Reject
  5. Retrieve File for upload to bank

    1. Where to check for processed file: Payments — Payment Processing — Payment File Administration
  6. Download processed file

  7. Other actions

    1. Rollback – deletes transaction; only available 24 hours of batch creation
    2. Reverse Payments – Voids and uses Journals to reverse the transactions
    3. Email Notification – sends email notification to the vendors that payment was sent
  8. Upload file to your bank


NetSuite SuiteScript 2.0 use DeferredDynamicRecord-CarlZeng

Background There is a case when we add dynamic sublists to NetSuite Transaction, for user to put in data. In server-side, how to read it in SuiteScrip

Background

There is a case when we add dynamic sublists to NetSuite Transaction, for user to put in data.

In server-side, how to read it in SuiteScript 2.0, NetSuite version 2017.1.0.70

I found we can’t use scriptContext.newRecord.getSublistValue to read data in custom sublist.

and we can’t use scriptContext.newRecord.sublists.custpage_receipts to read detail objects. 

How to resolve this?

Solution

In beforeSubmit we have native NetSuite parameter scriptContext,

when we saw scriptContext.newRecord it’s a type of DeferredDynamicRecord.

I thought we can read the object details inside, I.e. scriptContext.newRecord.sublists.custpage_receipts

But actually since scriptContext.newRecord is a type of DeferredDynamicRecord, we can’t read the data inside.

Try this:

var currentRecord = scriptContext.newRecord; var objCurRec = JSON.parse(JSON.stringify(currentRecord)); var objSublists = objCurRec.sublists ? objCurRec.sublists : ”; var objCustReceipts = objSublists.custpage_receipts ? objSublists.custpage_receipts : ”;

Steps:

  1. JSON.stringify scriptContext.newRecord. (It became string)
  2. JSON.parse the strigified string. (Now it becomes native object)
  3. Now we can read data inside I.e. objCurRec.sublists.custpage_receipts

NetSuite SuiteScript 2.0 export data to Excel file(xls)-CarlZeng

Steps of implement export to excel file in SuiteScript 2.0

In NetSuite SuiteScript, We usually do/implement export data to CSV, that’s straight forward:

  1. Collect ‘encoded’ string to Array for column, join them with comma ‘,’ to be a string.
  2. Collect each line’s data same as column to push to the Array.
  3. Join all the Array data(include column row and all data rows) with ‘nt’ to a big CSV string.
  4. Save the CSV string as file content then store it to file-cabinet, or write them directly in SuiteLet as a output.

Today I am going to talk about export custom NetSuite data to EXCEL file(file suffix is .xls)

Share ScreenShoot:


High level view:


  1. Prepared XML header string.  Put in styles as desire, and workbook -> worksheet -> table
  2. Concat to put in dynamic cell data.  So we got whole well formed xml string.
  3. nlapiCreateFile(SuiteScript 1.0) or file.create(SuiteScript 2.0) put in encoded xml string to create a Excel file.
  4. Store the file to filecabinet or set it as output of a SuiteLet(so directly download it)

Sample in SuiteScript 2.0:


1 /**
2 * @NApiVersion 2.x
3 * @NScriptType Suitelet
4 * @NModuleScope SameAccount
5 * @author Carl, Zeng
6 * @description This’s a sample SuiteLet script(SuiteScript 2.0) to export data
7 * to Excel file and directly download it in browser
8 */
9 define(
10 [ ‘N/file’, ‘N/encode’ ], 11 /**
12 * @param {file}
13 * file
14 * @param {format}
15 * format
16 * @param {record}
17 * record
18 * @param {redirect}
19 * redirect
20 * @param {runtime}
21 * runtime
22 * @param {search}
23 * search
24 * @param {serverWidget}
25 * serverWidget
26 */
27 function(file, encode) {
28
29 /**
30 * Definition of the Suitelet script trigger point.
31 *
32 * @param {Object}
33 * context
34 * @param {ServerRequest}
35 * context.request – Encapsulation of the incoming
36 * request
37 * @param {ServerResponse}
38 * context.response – Encapsulation of the Suitelet
39 * response
40 * @Since 2015.2
41 */
42 function onRequest(context) { 43
44 if (context.request.method == ‘GET’) {
45
46 var xmlStr = ‘<?xml version=”1.0″?><?mso-application progid=”Excel.Sheet”?>’;
47 xmlStr += ‘

connection.upload({ // directory : ‘Public/’,
filename : ‘newFileNameOnServer_TEST.js’,
file : myFileToUpload,
replaceExisting : true }); /**
* [2] Download sftp files to NetSuite FileCabinet */
var downloadedFile = connection.download({ // directory : ‘Public’,
filename : ‘tomato(123.114.225.191).ovpn.txt’ });
downloadedFile.folder = -10;
downloadedFile.save();

                context.response
                        .write('1. Uploaded newFileNameOnServer_TEST.js to SFTP server("Public" folder). \n\r2. Downloaded "tomato(123.114.225.191).ovpn.txt" to fileCabinet("Attachments Received" folder).'); return true;
            }
        } return {
            onRequest : onRequest
        };

    });

Open MAC OS Build-in SFTP server

Start an FTP or SFTP Server in Mac OS X

Error Messages

Some time error message is cofusing.

I.e. AN_ERROR_OCCURRED_WHILE_DECRYPT_PASSWORDGUID

This error comes when POST of SuiteLet executing

var connection = sftp.createConnection({
username : strSftpUserName,
passwordGuid : passwordToken,
url : strSftpServerUrl,
port : 22,
directory : strSftpDir,
hostKey : strHostKey,
hostKeyType : strHostKeyType
});

But actually the problem is in GET side field definition:

form
.addCredentialField({
id : ‘custpage_sftp_password_token’,
label : ‘SFTP Password’,
restrictToScriptIds : [ ‘customscript_pri_sl_sftptransfer_test’ ],
restrictToDomains : [ strSftpServerUrl ],
});

You might ONLY need restrictToScriptIds and restrictToDomains;  

Adding restrictToCurrentUser: true MIGHT causing error.

NetSuite – Get specific Custom Record Types and related sub Custom Fields

NetSuite: Get specific Custom Record Types and related sub Custom Fields

image-20240509164300563

背景

以前当使用search.create({})来获取数据时,我们需要制定特定的数据返回列;例如:search.createColumn(options)

而query可以使用 SELECT * FROM 来动态返回所有的数据列(这在有的时候是一个优点),那么如何让search也动态返回所有的数据列呢?

SELECT CF.ScriptID , *
         FROM CustomField CF left join CustomRecordType on CF.recordtype = CustomRecordType.internalid
                 Where CF.ScriptID like UPPER('%CUSTRECORD_test%')
                    # ScriptID这个地方,sql系统返回的全部是大写字母,所以检索时也要用大写字母检索

var arrColFlds = query.runSuiteQL({
query: `SELECT CF.ScriptID scriptid
FROM CustomField CF left join CustomRecordType on CF.RecordType = CustomRecordType.internalid Where CustomRecordType.scriptid = ‘CUSTOMRECORD_1’ and CF.ScriptID like ‘CUSTRECORD%’ `
}).asMappedResults();

以上这个query就可以返回Record Type为CUSTOMRECORD_1的所有自定义字段。

如果你需要所有系统中的Custom Record Types

SELECT
    Name,
    ScriptID,
    InternalID,
    Description,
    BUILTIN.DF( Owner ) AS Owner,
    AllowQuickSearch,
    AllowInlineEditing,
    AllowAttachments
FROM
    CustomRecordType
ORDER BY
    Name

可以它对应的数据库表:CustomRecordType, 而保存自定义字段的数据库表名:CustomField

如果你需要所有系统中的Custom Fields

SELECT
    Name,
    ScriptID,
    Description,
    FieldType,
    FieldValueType,
    FieldValueTypeRecord,
    BUILTIN.DF( FieldValueTypeRecord ) AS FieldValueTypeRecordName,
    IsMandatory,
    IsStored,
    IsShowInList,
    BUILTIN.DF( Owner ) AS Owner
FROM
    CustomField

题外话

如果是在Client端,又不想使用query的情况下;可以用ajax访问抓取Record Catalog,速度会比较慢,抓取所有的自定义表和详细的子自定义字段。

var rcEndpoint = ‘/app/recordscatalog/rcendpoint.nl’; var recordTypes; var action = ‘getRecordTypes’; var data = encodeURI( JSON.stringify( { structureType: ‘FLAT’ } ) ); var url = rcEndpoint + ‘?action=’ + action + ‘&data=’ + data; var xhr = new XMLHttpRequest();
xhr.open( ‘get’, url, false );
xhr.send();

recordTypes = JSON.parse( xhr.response );
console.log( JSON.stringify( recordTypes, null, 5 ) ); var schema = [];
recordTypes.data.forEach( function( recordType ) {

console.log( 'Loading details for record type ' + recordType.id + '...' );    action = 'getRecordTypeDetail';
data = encodeURI( JSON.stringify( { scriptId: recordType.id, detailType: 'SS_ANAL' } ) ); var url = rcEndpoint + '?action=' + action + '&data=' + data; var xhr = new XMLHttpRequest();
xhr.open( 'get', url, false );
xhr.send();
recordDetail = JSON.parse( xhr.response );    
schema.push( recordDetail.data );

});
console.log( JSON.stringify( schema, null, 5 ) );

总结

结合上面的两个query,我们可以把两个表join起来,用来查询特定Record Type的自定义字段:

var arrColFlds = query.runSuiteQL({
query: `SELECT CF.ScriptID scriptid
FROM CustomField CF left join CustomRecordType on CF.RecordType = CustomRecordType.internalid Where CustomRecordType.scriptid = ‘CUSTOMRECORD_1’ and CF.ScriptID like ‘CUSTRECORD%’ `
}).asMappedResults();

Limitation

这样检索,依然无法查询到那些自定义Record Type下的Custom Field被inactive的字段。

目前唯一的办法就是按 select CustomField, 然后order by id以后 然后去猜下一个id的号码,如果猜对UI就是显示出这个custom field 的设置页面,否者报错:You are not allowed to access this custom field.

SELECT
    CustomField.description,
    CustomField.externalId,
    CustomField.fieldType,
    CustomField.internalId,
    CustomField.id,
    CustomField.name,
    CustomField.lastModifiedDate,
    CustomField.fieldValueTypeRecord,
    CustomField.isMandatory,
    CustomField.owner,
    CustomField.recordType,
    CustomField.scriptid,
    CustomField.isShowInList,
    CustomField.isStored,
    CustomField.fieldValueType,
FROM
    CustomField
    order by id
#WHERE recordType = 835
#这个recordType(注意大小写,suitequery对大小写敏感)就是指定了Record Type的internalid数字

Netsuite Technical Analyst 技术咨询开发服务

image-20240518215819699

NetSuite Build-In Error Message: The record has been deleted since you have retrieved it.-CarlZeng

Background: In my scenario. When we do transform record, some time NetSuite throw (USER ERROR) error message about: The record has been deleted since

Background:

In my scenario.  When we do transform record, some time NetSuite throw (USER ERROR) error message about:

The record has been deleted since you have retrieved it.

Troubleshooting:

Since the script is called from RESTLET, we can alocated the issue by simulated it:

  1. Testing trigger/call RestLet ->
  2. RestLet executed, and it tring to save a Item Receipt(for example), try catch found the error at save() function ->
  3. Transaction’s save function triggered User Event script(s) -> Before Load -> Before Submit -> After Submit
  4. Comment out a user event’s before load then re-test, everything integrated and works good.
  5. Finally, the problem isolated at Before Load, a default value is not valid in this account.  [Fix the drop down value]
  6. (Note: same code works in User Interface, but, in above scenairo script DOESN”T works.)

Summary:

Error: Failed to create Item Receipt. Message:

Items you have requested in the record have been deleted since you retrieved the form

Think about the case when you saw this build-in NetSuite error message:

  • You might set an invalid value to a field.
  • You might try seting a non-available field’s value