• tim111
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

I have created a VF page  where i have put lead fields in custom picklist(picklist name is FIELD NAME).Now i want "when i choose any field name i want to get the values of lead. For eg when i choose "status" fieldname  a picklist should show as it is there on Lead object , when i choose "industry" fieldname a picklist show showing all the industries.Please help...i am new  to apex.please explain with code.help will br appreciated....

  • February 05, 2012
  • Like
  • 0

I am new to apex....i want to create Custom Picklist in whick i want all the fields of lead....Please tell me the code what should i write...Help will really be appreciated...!!!

  • January 24, 2012
  • Like
  • 0

"if the first name of leads is test then add those leads under Test Campaign as campaign members
 if  the first name of leads is not test then add those leads under Final campaign as campaign members"

 

trigger Campaign on Lead (after insert)
{
    for(Lead l:Trigger.new)
    {
        if(Trigger.isInsert)
        {
            List<Lead> lst=[Select Id,Name,Company,Status from Lead where id=:l.Id];
            Campaign camp=[Select Id,Name from Campaign where Name=:'Test Campaign'];
            
            for(Lead b:lst)
            {
                if(b.Name=='Test')
                {
                b.Campaign=camp.Id;
                }
            }
        }
    }
}

 

i am getting a error"INVALID FIELD CAMPAIGN ON SOBJECT LEAD"

please help me i am new to apex.

  • January 22, 2012
  • Like
  • 0

I have created a VF page  where i have put lead fields in custom picklist(picklist name is FIELD NAME).Now i want "when i choose any field name i want to get the values of lead. For eg when i choose "status" fieldname  a picklist should show as it is there on Lead object , when i choose "industry" fieldname a picklist show showing all the industries.Please help...i am new  to apex.please explain with code.help will br appreciated....

  • February 05, 2012
  • Like
  • 0