ディスカッション
AIを用いた自動化で請求書処理を合理化
AIを用いた考察を使用して、計画と予測を迅速化
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
We’re excited to announce that the 2025 Community Recap is now available! This special recap highlights the amazing contributions and achievements of our members over the year and celebrates the collective success of our community.
Check your personalized recap to see the impact you made in 2025 and how your efforts helped shape our community’s growth and success.
View Your 2025 Community Recap
Thank you to everyone for your passion, collaboration, and support. Here’s to building an even stronger community together in the year ahead!
Season’s greetings to you and yours! As we head into the holidays (December 24 – January 4), we want to take a moment to celebrate the incredible strength and collaboration within our community. Even during the break, you can continue to benefit from connecting with peers, searching related threads, posting your questions, and marking helpful replies as “Accepted” in the Support Community.
Please note our dedicated team will be on reduced coverage during this time, and regular responsiveness will resume on January 5. Wishing you a joyful and restful holiday season!
-The NetSuite Support Community Team
SuiteScript1.0を使用して注文書の未請求額を表示する
適用
製品: NetSuite 2022.1
シナリオ
未請求額は、まだ請求されていない注文書の金額であり、特定の顧客の合計が顧客レコードに反映されます。レポート作成や分析などのさまざまなビジネス目的で、ユーザーは、ビジネス目標の達成を支援するために、未請求の注文書を注文書に表示することを決定する場合があります。
解決策
カスタムフィールドとBeforeLoad機能を備えたユーザーイベントスクリプトを使用して、ユーザーは注文の未請求額を表示し、さまざまな目的でこの値を利用できます。
- トランザクションボディーフィールドを作成します
- カスタマイゼーション> リスト、レコード、およびフィールド> トランザクションボディーフィールド> 新規作成に移動します
- トランザクションボディーフィールドページで、次の値を入力します
- ラベル:任意の値を入力します(例:未請求額)
- ID:任意の値を入力します(例:_amount_unbilled)
- 種類:通貨
- 次に適用サブタブで、販売チェックボックスをオンにします
- トランザクションボディーフィールドを保存します
- 次のサンプル・コードを使用して、「ロード前」機能が注文書レコード・タイプにデプロイされたユーザー・イベント・スクリプトを作成します。
注: ロード前関数を使用したスクリプトの定義の詳細は、SA記事10553「スクリプト・レコードの作成ステップ」を参照してください。
function showUnbilled(type, form, request) {
var recordId = nlapiGetRecordId();
var recordType = nlapiGetRecordType();
if (recordId) {
var column = [];
column[0] = new nlobjSearchColumn('amountunbilled');
var filter = [];
filter[0] = new nlobjSearchFilter('internalid', null, 'anyof', recordId);
filter[1] = new nlobjSearchFilter('type', null, 'anyof', 'SalesOrd');
filter[2] = new nlobjSearchFilter('mainline', null, 'is', 'T');
var search = nlapiSearchRecord('transaction', null, filter, column);
if (search) {
var search_amount = parseFloat(search[0].getValue('amountunbilled'));
var rec_amount = parseFloat(nlapiGetFieldValue('custbody_amount_unbilled'));
if (rec_amount != search_amount) {
nlapiSubmitField(recordType, recordId, 'custbody_amount_unbilled', search_amount);
nlapiSetRedirectURL('RECORD', recordType, recordId);
} else if (search_amount == '0' && rec_amount != '0') {
nlapiSubmitField(recordType, recordId, 'custbody_amount_unbilled', search_amount);