Good evening, I have been at the office since 0700 this morning and it is now 2309. I have the majority of all of the trigger and everything situated for my new custom object except for this last piece. I need to automatically assign the AccountTeamMember and TeamMemberRole to the New Account when an Account Request is converted to an actual Account.
The following is what I have... thank you in advance!
trigger addAccountTeamMember on Account_Request__c (after insert){
List<Account> AccountTeamMember = new List<Account>();
for (Account_Request__c ar : Trigger.new){
if(ar.Account_Request_Status__c == 'Convert'){
AccountTeamMember.TeamMemberRole = ar.Account_Team_Role__c,
AccountTeamMember.UserId = ar.Account_Team_Owner__c;
}
}
insert AccountTeamMember;
}