ディスカッション
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.
連結子会社に基づいて場所を自動入力するサンプルスクリプト
適用
製品: NetSuite 2023.1
シナリオ
連結子会社に基づいて場所を自動入力するサンプルスクリプト
解決策
クライアント
// SuiteScript 1.0 function postsourcing(type, name, linenum){ if(name == 'entity'){ var subsidiary = nlapiGetFieldValue('subsidiary'); switch(subsidiary){ case '2': var location = '2' break; case '4': var location = '1' break; case '3': var location = '7' break; case '7': var location = '19' } nlapiSetFieldValue('location',location); } } // SuiteScript 2.0 function postsourcing(context){ if(context.fieldId == 'entity'){ var subsidiary = record.getValue({ fieldId: 'subsidiary' }); switch(subsidiary){ case '2': var location = '2' break; case '4': var location = '1' break; case '3': var location = '7' break; case '7': var location = '19' } recordObj.setSublistValue({ fieldId: 'location', value: location }); } } ユーザイベントスクリプト // SuiteScript 1.0 function beforeload(){ if (nlapiGetFieldValue('entity')!="" && nlapiGetFieldValue('subsidiary')!=""){ var subsidiary = nlapiGetFieldValue('subsidiary'); switch(subsidiary){ case '2': var location = '2' break; case '4': var location = '1' break; case '3': var location = '7' break; case '7': var location
タグ付けされた:
0