• Lalit Dhupar 13
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Hi All,

I have a requirement in which i need to display the names of all the apex classes in VF page drop down list and on selection of the apex class name, it should retrieve the id of the apex class. Could you please help.

Thanks!
i am doing report and dasboard super challenge 2 in trailhead but Accounts with Contacts and Contact Hobbies report type is not coming but Contact with contact hobbies and hobbies is coming but in challenge we need Account as top object. Dont know what wrong i have done.image
 
Hello,

i am new to salesforce and I have a custom field on account as Consecutive_Contacts_Name__c. Whenever a new contact is inserted the field should have value of the contact first name if Consecutive_Contacts_Name__c =null on account. if Consecutive_Contacts_Name__c != null it should have the previous value +',' + recent contact first name. Below is my code but it is not working properly. Could anyone please help on the same.

rigger ContactOnAccount on Contact (after insert) {
    List<Account> accList = new List<Account>();
    for (Contact con:[select FirstName, Account.Consecutive_Contacts_Name__c, Account.Id from Contact where id in:trigger.new]) 
    {
        
        Account acc = new Account(id=con.Account.id);  
        
        acclist.add(acc);
        if(acc.Consecutive_Contacts_Name__c == '' && acc.Consecutive_Contacts_Name__c == Null)
        {
            acc.Consecutive_Contacts_Name__c = con.FirstName; 
            update acclist;       
        }
        else{
            acc.Consecutive_Contacts_Name__c = acc.Consecutive_Contacts_Name__c + ',' + Con.FirstName;
           update acclist;
            }
    }
     
    
}
Hi All,

I have a requirement in which i need to display the names of all the apex classes in VF page drop down list and on selection of the apex class name, it should retrieve the id of the apex class. Could you please help.

Thanks!