ディスカッション
NetSuiteの保存検索やレポートをマスターするための究極のガイドである分析センターを使用して、データの力を最大限に活用しましょう。複雑さを単純化し、組織の真の可能性を解き放ちます。今すぐ分析センターに参加して、新たな高みを目指しましょう!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
URLフィールドの値をSuiteletフォームへ渡す
適用
製品: NetSuite 2022.2
シナリオ
NetSuiteのレコードからURL情報をクリックされるリンクとしてSuiteletへ渡します。
解決策
以下のサンプルを参照します。
URLを保存するフィールドを作成します。
- カスタマイゼーション > リスト、レコード、およびフィールド > エンティティ・フィールド > 新規 へ移動します
- 次のパラメータを設定します
- 種類:自由形式テキスト
- 次に適用:連絡先
- 値を保存:T
- ID = '_contactURL'
SuiteletのURLを保存するフィールドを作成します。
- カスタマイゼーション > リスト、レコード、およびフィールド > エンティティ・フィールド > 新規 へ移動します
- 次のパラメータを設定します
- 種類:ハイパーリンク
- 値を保存:T
- 次に適用:連絡先
- ID = '_suiteletURL'
以下のサンプルのクライアント・スクリプトを使用します。このスクリプトは、連絡先レコードのURLフィールドに入力された値をパラメータとしてSuiteletURLに追加します。保存した後、SuiteletのURLはクリックされるようになります。
function clientFieldChanged(type, name, linenum) { if (name == 'custentity_contactURL') { var suiteletURL = nlapiResolveURL('SUITELET', < suitelet internal id here > , < suitelet deployment id here > ); var contactURL = nlapiGetFieldValue('custentity_contactURL'); if (contactURL) { var custParam = '&custparam_URL=' + encodeURI(contactURL); suiteletURL = suiteletURL + custParam; nlapiSetFieldValue('custentity_suiteletURL', suiteletURL); } }}
次は、以下のサンプルのSuiteletスクリプトを使用します。
function suitelet(request, response) { nlapiLogExecution('DEBUG', 'Request', request); if (request.getMethod() == 'GET') { var thisURL = request.getParameter('custparam_URL'); var thisForm = nlapiCreateForm('URL to Form'); var urlField = thisForm.addField('custpage_url', 'inlinehtml', 'HTML Link', null, null); nlapiLogExecution('DEBUG', "URL", thisURL); newURL = "" http: //"" +="" thisurl="" >This is now link."; urlField.setDefaultValue(newURL); 0