ディスカッション
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.
SuiteScriptのクライントスクリプトでポップアップSuiteletを呼び出して、フィールドの値を設定する
適用
製品: NetSuite 2022.1
シナリオ
トランザクションレコードでアイテムを検索して選択するポップアップSuiteletを呼ぶクライントスクリプトです。Suiteletからアイテムを選択した後、レコードのアイテムラインに選択したアイテムを設定します。
解決策
Javascriptのwindow.openの機能を介して、Suiteletから呼び元のトランザクションレコードへ値を設定します。
ポップアップSuiteletを呼ぶ出すクライントスクリプトの作成方法は、SuiteAnswers Id: 85134にて記載されています。
window.open(suiteletURL, "New Window Title", params);
SuiteScript 1.0
function suitelet(request, response){ if(request.getMethod() == 'GET'){ var myForm = nlapiCreateForm('Find Item(s)', true); myForm.setScript('customscript_find_item_cs'); myForm.addField('custpage_selectitem', 'select', 'Select Item', '-10'); myForm.addSubmitButton('Submit'); response.writePage(myForm); } else{ var selecteditem = request.getParameter("custpage_selectitem"); var str = ''; response.write(str); } }
SuiteScript 2.0
/* * @NApiVersion 2.x * @NScriptType Suitelet */ define(['N/ui/serverWidget'], function(serverWidget) { function onRequest(context) { if (context.request.method === 'GET') { var myForm = serverWidget.createForm({ title: 'Find Item(s)', hideNavBar: true }); // In SuiteScript 2.0, file path of the script is being supplied
タグ付けされた:
0