• Divya Voruganti
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi Team,
I have a requirement.
On User Object I have one Department Picklist field and same field on Employe Object. But there is no relation, when ever the User is created with pertecular Department PickList Value is need to be updated in Employee object Department field.
What are the best possibilities to achieve this requiment. Please share me some helpful information.

   Thanks in advance....

Thanks 
Venkat.
Set<Id> accId= new Set<Id>(rootParentIdSet);
for(Integer counter = 0; counter < 7; counter++) {
                 Map<Id, Account> accMap = new Map<Id, Account>([Select Id,ParentId from Account
                 where ParentId In :accId);
              if(accMap != null && !accMap.isEmpty()) {
                    accId= accMap.keySet();
                    accIdSet.addAll(accId);
               }
            }