ディスカッション
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.
SuiteScript経由でnlapiXMLToPDFを使用して、統合トランザクションPDFを添付ファイルとして送信する
適用
製品: NetSuite 2023.2
シナリオ
現在、nlapiPrintRecordは、IDパラメータに対して複数のトランザクションIDをサポートしていません。したがって、実際のNetSuiteプリントアウトを単一のPDFに統合することはできません。
解決策
以下のサンプルコードを使用すると、トランザクション> 管理> フォームを印刷> 請求書> 複数の請求書を選択> 印刷と同じ方法でPDFを生成できます。
var sResult = new Array();
sResult = nlapiSearchRecord('transaction', 'customsearch', null, null); //load an existing transaction saved search or create a search
var xml = "\"1.0\"?>\n\"-//big.faceless.org//report\" \"report-1.1.dtd\">\n";
xml += "";
for(var i=0; sResult != null && i < sResult.length; i++){
var sColumns = sResult[i].getAllColumns();
//generate invoice printout
var pdfFile = nlapiPrintRecord('TRANSACTION', sResult[i].getValue(sColumns[0]),'PDF');
//set target folder in file cabinet
pdfFile.setFolder(13);
//Set Available without login to true
pdfFile.setIsOnline(true);
//store file in cabinet
var fileID = nlapiSubmitFile(pdfFile);
//
タグ付けされた:
0