• palukuru sfdc
  • NEWBIE
  • 15 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi Can someone explain how to set the lookup (from account name value) to conatct name when creating contact from anonymous window.

List<contact> contactToSave = new List<contact> ();
Contact cont = new Contact();
Account acctRef = new Account(name='University of Arizona'); // need to set this name to contact which I'm creating below. Account name already available on org 
cont.FirstName='Test1';
cont.LastName='Test2';
cont.Department='Finance';
cont.name=actRef;
contactToSave.add(cont);
insert contactToSave;

please explain how this works...
Hi Can someone explain how to set the lookup (from account name value) to conatct name when creating contact from anonymous window.

List<contact> contactToSave = new List<contact> ();
Contact cont = new Contact();
Account acctRef = new Account(name='University of Arizona'); // need to set this name to contact which I'm creating below. Account name already available on org 
cont.FirstName='Test1';
cont.LastName='Test2';
cont.Department='Finance';
cont.name=actRef;
contactToSave.add(cont);
insert contactToSave;

please explain how this works...
I have an Employee object where Employee ID is the key field (aka the Record Name field).  When an employee shows up in the Recent Items list, the Employee ID is shown, which isn't very clear for the user.  Is it possible to make a different field show in the Recent Items list, specifically the Name field?