netsuite数据类型的获取(以货品item举例)以及价格带的js获取-CarlZeng
po,so等单据,读取关联的流程业务数据,netsuite-CarlZeng
to display netsuite transactions detail-CarlZeng
两个NetSuite之间历史交易数据迁移的具体方案-CarlZeng
关于NetSuite内部Enhancement发表及查看的实现(netsuite论坛,netsuite留言本,netsuite评论的实现)-CarlZeng
关于netsuite编辑单据页面默认打开某tab的办法-CarlZeng
A feature in Netsuite Reports > Financial > Balance Sheet-CarlZeng
Bar codes in NetSuite Saved Searches(transport/reprint) 活用NetSuite搜索页面显示可扫描条码-CarlZeng
FedEx Package Rate Integration with NetSuite direct integrate by WebServices-CarlZeng
Quick TECHNICAL Note
Reality: UPS only support WebServices integration(or window platform exe application: FedEx Ship Manager® Lite), friendly for JAVA, PHP or C#.
We need to calling UPS SOAP services in NetSuite directly, so there is JSON -> XML for input expected XML parameters and parse API return result XML -> JSON action.
Different from UPS, There is high request for xml’s element order/sequence for FedEx API.
This’s a re-usable framework for intergration with WebServices platform/application.
Registration for the Developer Keys
We will need registration on webside got
Developer Test Key: PFPtfQE9ME1N****
Required for FedEx Web Services for Intra Country Shipping in US and Global
and the Email Box:
Title: Your Developer Test Key Registration is complete
Test Account Information
<spacer.gif>
Test URL: https://wsbeta.fedex.com:443/web-services
Test Password: H6F4kyFrYIQxALXOTbH53****
FedEx Web Services Testing Information:
FedEx Shipping Account Number: **0088000
FedEx Meter Number: ***2012**
On NetSuite Side we are targeting to achieve xml files like the sample:
Example 1:Rate Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/“ xmlns:SOAP-
ENC=”http://schemas.xmlsoap.org/soap/encoding/“ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance“ xmlns:xsd=”http://www.w3.org/2001/XMLSchema“ xmlns=”http://fedex.com/ws/rate/v28">
SOAP-ENV:Body
And all above xml element is dynamically transfered from NetSuite Sales Order data(and also data from location, currency, custom record types, settings), We got those data(in expected order), using the Google Project’s X2JS to convert from JSON to XML.
Next resolve the across domain ajax call by using NetSuite 2.0 API https.post
var response = https.post({
url: ‘https://wsbeta.fedex.com:443/web-services‘,
body: new X2JS().json2xml_str(PostDataObj),
headers: {
“Accept”: “image/gif, image/jpeg, image/pjpeg, text/plain, text/html, */*“,
“Content-Type”: “text/xml”,
“Access-Control-Allow-Origin”: ‘*‘,
}
});
Need to thanks this thread for useful notes: https://stackoverflow.com/questions/62523251/creating-a-http-post-call-for-fedex-web-services
FedEx Webservices Errors
Response Code 400 or 500
- Accross domain Error
- Schema Error
UnrecoverableClientError SchemaError
validation failure for RateRequest Error:cvc-complex-type.2.4.a: Invalid content was found starting with element - Check the XML object sent to FedEx, the order of the element MUST match to the WDSL schema
- Check the XML object elements if there is addtional property
FedEx 404 Unrecoverable ClientError
- Double check the target server url address
- test url: https://wsbeta.fedex.com:443/web-services
- production url: https://ws.fedex.com:443/web-services
Share tools used between XML and JSON
- Testing/xmlTOjson/jsonTOxml: https://peterdaugaardrasmussen.com/json2xml/
- Source Code: https://github.com/abdolence/x2js
- Useful Javascript framework for convention between XML and JSON
- Format XML: https://jsonformatter.org/xml-formatter
- Format JSON: https://www.sojson.com/json/json\_online.html
- XML compare/diff https://extendsclass.com/xml-diff.html
- Be careful, the result of the xml diff is not in element order, the diff not acurate for FedEx test
- Comparing XML files: https://extendsclass.com/xml-diff.html
- POSTMAN simulate and compare the input and output
- Powerful and Easy to use
- XML Formatter https://www.freeformatter.com/xml-formatter.html
- Make XML clean and clear
- JSON Reviewer/Formatter http://jsonviewer.stack.hu
- Clean and clear
- JSON to XML https://www.convertjson.com/json-to-xml.htm
Estimate Rate
- UPS https://www.theupsstore.com/tools/estimate-shipping-cost
- FedEx https://www.fedex.com/en-us/online/rating.html
Integrate with existing UPS integration
While end-use switching shipping carries, we need to clean up the backend package list data and rebuild for current shipping carrier, since UPS and FedEx are using DIFFERENT formating and propertys.
Google Sheet NetSuite Integration 设计理念-CarlZeng
(How can I use Node.js in Netsuite?) NetSuite to run Node.js packages/modules, i.e. mozilla/pdf.js-CarlZeng
NetSuite’s javascript engine is Rhino(I.e. Rhino 1.7), we can not run node-based code on NetSuite, however,
write your code as, say, an npm module, and run npm scripts from the command line. I have done this in the past for unit testing, doc generation, eslint, etc. In order to actually run code in NetSuite, though, it must be in a plain .js file that NetSuite can interpret and load as a Library on your Script record.
Node.js in SuiteCommerce
downloading Node.js to use for SuiteCommerce.
How can I use Node.js in Netsuite?
20231008 Server端没有开启解释器,没配置环境,就无法识别原生的Node.js代码