ディスカッション
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.
ワークフローアクションスクリプトによるプロジェクトタスク完了後のタスクの作成
適用
製品: NetSuite 2022.2
シナリオ
プロジェクトのタスクが完了したときに、プロジェクトに割り当てられている従業員のタスクを作成するワークフロー アクション スクリプトを作成したい。
解決策
SuiteScript 1.0:
var projectName = nlapiGetFieldValue('company'); var jobRecord = nlapiLoadRecord('job', projectName); var empResource = jobRecord.getFieldValue('custentity_asstoproj'); //custom field that holds the employee assigned for the project/task if(nlapiGetFieldValue('status') == 'COMPLETE'){ var task = nlapiCreateRecord('task'); task.setFieldValue('title', 'Created from Project '+projectName); task.setFieldValue('sendemail','T'); task.setFieldValue('assigned', empResource); task.setFieldValue('message', 'Message here'); nlapiSubmitRecord(task); }
SuiteScript 2.0:
var projectName = objRecord.getValue({ fieldId: 'company' }); var jobRecord = record.load({ type: record.Type.job, id: projectName, isDynamic: true, }); var empResource = objRecord.getValue({ fieldId: 'custentity_asstoproj' }); var status1= objRecord.getValue({ fieldId: 'status' }); if(status1 == 'COMPLETE'){ var task = record.create({ type: record.Type.TASK, isDynamic:
タグ付けされた:
0