Applicant_ID__c という名前のアカウントに外部 ID があります。データローダーを使用してデータをセールスフォースの商談にインポートしています。以下は私のマッピングファイルの内容です。
Date\ Cancelled=Date_Cancelled__c
Date\ Denied=Date_Denied__c
Date\ Decisioned=Date_Decisioned__c
App\ Status=Application_Status__c
Date\ Submitted=Application_Submitted__c
Closing\ Date=CloseDate
Application\ Source=Application_Source__c
Application\ Type=Application_Type__c
Application\ Sub-Type=Application_Sub_Type__c
App\ ID=App_ID__c
Property=Property_Name__r\:Property_Code__c
Applicant\ ID=Account\:Applicant_ID__c
Record\ Type\ ID=RecordTypeId
上記のマッピングは正しく機能しており、トリガーから機会名を入力する必要があります。以下は私のトリガーコンテンツです
trigger MapStatusToStageBeforeOpportunintyCreation on Opportunity (before insert, before update) {
for (Opportunity o : Trigger.New){
Account acc = [Select LastName From Account Where Applicant_ID__c =:Account:Applicant_ID__c];
o.Name =acc.LastName;
}
}
前もって感謝します。