ディスカッション
NetSuiteの保存検索やレポートをマスターするための究極のガイドである分析センターを使用して、データの力を最大限に活用しましょう。複雑さを単純化し、組織の真の可能性を解き放ちます。今すぐ分析センターに参加して、新たな高みを目指しましょう!
SuiteScriptAPIを使用して顧客/リードを仕入先に変換するnlapiRequestURL
適用
製品: 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
タグ付けされた:
0