• IT Operations
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Here is the sample code I'm trying to run.  When I requery the contact record for account.name, it returns null.  Does anyone know why this is?

@isTest public class TestSampleInsert {
public static testMethod void testMyController() {        
Account someAccount = new Account(Name = 'Test Account', Website = 'http://www.somesite.com');
insert someAccount;

Contact someContact = new contact(FirstName = 'Tim', lastName = 'Joes', Email = 'test@test.com', Account = someAccount);
insert someContact;

// Requery contact for field data
Contact contactRequery = [SELECT ID, FirstName, LastName, Email, Account.Name from Contact where ID = :someContact.id limit 1];

// This fails!  Account.name is null
System.AssertEquals(contactRequery.account.name, 'Test Account');
}
Here is the sample code I'm trying to run.  When I requery the contact record for account.name, it returns null.  Does anyone know why this is?

@isTest public class TestSampleInsert {
public static testMethod void testMyController() {        
Account someAccount = new Account(Name = 'Test Account', Website = 'http://www.somesite.com');
insert someAccount;

Contact someContact = new contact(FirstName = 'Tim', lastName = 'Joes', Email = 'test@test.com', Account = someAccount);
insert someContact;

// Requery contact for field data
Contact contactRequery = [SELECT ID, FirstName, LastName, Email, Account.Name from Contact where ID = :someContact.id limit 1];

// This fails!  Account.name is null
System.AssertEquals(contactRequery.account.name, 'Test Account');
}

Hi,

I need to put a custom related list on the account detail page and put the Hover link on the top of the page for the custom related list.

 

I was able to do the custom related list displayed on the bottom of the Account detail page wiring a standard controller extension and visula force page.

 

Now the problem is How do I place the Hover link on the top of the page for the custom list? I saw couple of threads for the above, but the hover links issue was never discussed?.

 

Can any one please guide me how can I do this.

 

Thank you.