• Isaac Sean
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
    for (User use : Trigger.new) {
        String accid = use.AccountId;
        List<Account> account = [SELECT AccountNumber FROM Account WHERE Primary_Id__c = :accid];
        if(account != null && account.size()>0)
             use.Primary_id__c = account[0].AccountNumber;
    }
}