megaphone
SuiteWorld 2026の登録が開始されました。今なら300ドル節約できます。 今すぐ登録しましょう

ディスカッション

NetSuiteの保存検索やレポートをマスターするための究極のガイドである分析センターを使用して、データの力を最大限に活用しましょう。複雑さを単純化し、組織の真の可能性を解き放ちます。今すぐ分析センターに参加して、新たな高みを目指しましょう!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.

発注書にて経費サブタブを隠す

編集済:Jun 2, 2025 2:48PM SuiteCloud / カスタマイズ

適用

製品:  NetSuite 2023.1

 



シナリオ

スクリプトを介して、発注書のカスタムフォームの経費サブタブを隠したいです。



解決策

ユーザーイベントスクリプトのロード前機能を介して、発注書のカスタムフォームにて経費サブタブを隠します。

SuiteScript 1.0:

 
function userEventBeforeLoad(type, form, request) { 
 if (type == 'edit' || type == 'create') { 
  var expenseForm = nlapiGetFieldValue('customform'); 
 
 
  if (expenseForm == '103') //経費サブタブを隠すカスタムフォームの内部IDに変更 
  { 
   var currentForm = form.getSubList('expense'); 
   currentForm.setDisplayType('hidden'); 
  } 
 } 
 if (type == 'view') { 
  var expenseForm = nlapiLookupField(nlapiGetRecordType(), nlapiGetRecordId(), 'customform'); 
  if (expenseForm == '103') //経費サブタブを隠すカスタムフォームの内部IDに変更 
  { 
   var currentForm = form.getSubList('expense'); 
   currentForm.setDisplayType('hidden'); 
  } 
 } 
} 


SuiteScript 2.0:

 
function beforeLoad(scriptContext) { 
 var type = scriptContext.type; 
  
 if (type == 'edit' || type == 'create') { 
  var expenseForm = scriptContext.newRecord.getValue({fieldId:'customform'}) 
 } else if (type == 'view') { 
  var expenseForm = search.lookupFields({ 
   type: scriptContext.newRecord.type, 
   id: scriptContext.newRecord.id, 
   columns: 'customform' 
  }) 
 } 
  
 if (expenseForm == 103) { //経費サブタブを隠すカスタムフォームの内部IDに変更 
  var expenseSublist = scriptContext.form.getSublist({id:'expense'})) 
  expenseSublist.setDisplayType = 'hidden'; 
 } 
} 



スクリプトの作成とデプロイメントについては、SuiteScript 1.0 スクリプトの作成、デプロイ、ログ- SuiteAnswer Id: 29246

ようこそ!

サインイン

完全な詳細を表示するには、サインインしてください。

登録

アカウントがありませんか?ここをクリックして始めましょう!

リーダーボード

コミュニティの達人

第2四半期 (4月~6月 2026)

今週のリーダー

今月のリーダー

歴代リーダー