ディスカッション

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.

SuiteScriptAPIを使用して顧客/リードを仕入先に変換するnlapiRequestURL

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

適用

製品:  NetSuite 2020.2



シナリオ

SuiteScriptのnlapiRequestURL APIを使用して顧客またはリードを仕入先に変換するまたは、仕入先の関係を追加。

record.transformメソッドまたは変換APIは、リード/顧客を仕入先に直接変換することをサポートしていないため、以下方法で行います。
以下の記事をご参照ください。

  45156 record.transform(options) > subsection Supported Transformation Types).



解決策

サンプルスクリプトは以下となります。

In SuiteScript 1.0:

 recid = 5; //current Lead Id 
 var url = '/app/common/entity/company.nl?e=T&target=s_relation:otherrelationships& 
 label=Other+Relationships&fromtype=custjob&id=' + recid + '&totype=vendor'; 
 var response = nlapiRequestURL(url); 

In SuiteScript 2.0:

 recid = 5; //現在のリードのID 
 // URLモジュールからドメインを取得。相対パスが使用されたSS1.0と比較して、URLモジュールは絶対パスをサポートします
 var domain = 'https://'; 
 domain += url.resolveDomain({hostType:url.HostType.APPLICATION, accountId:runtime.accountId}); 
 var sample_url = '/app/common/entity/company.nl?e=T&target=s_relation:otherrelationships& 
 label=Other+Relationships&fromtype=custjob&id=' + recid + '&totype=vendor'; 
 var response = https.request({method: https.Method.GET ,url: sample_url 

ようこそ!

サインイン

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

登録

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

リーダーボード

コミュニティの達人

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

今週のリーダー

今月のリーダー

歴代リーダー