• Fouzan Baig A
  • NEWBIE
  • 45 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
How can we make a vertical tab in visualforce page
Hi All,

I have 1K+ Leads that I need to convert to Contacts because we don't work out of Leads in my org.  In order to convert them and put them in their own respective Accounts (instead of all bucketed into one Account), I need a trigger.  Here's what I've done but I need your help:

I've created a hidden field checkbox on the Lead object called Auto_Convert__c (developer name, obviously).  I then want to mass update the Leads to check that Box.  I've started writing a trigger to detect that Lead update but I haven't gotten very far because I'm brand new to Apex.

""trigger ConvertLeads on Lead (before update)
       for (Lead l : trigger.New)​                
           if (l.Auto_Convert__c == True)"

I need some kind of SOQL list or two:
[SELECT Id FROM Lead WHERE Auto_Convert__c == True]

I also need to make it possible to put them into or create their accounts based on their Email domain or Company name (this isn't going to be perfect but it should work well enough for us)

Code:
"String domain = lead.Email.substringAfter('@');
Account acct = [select Id from Account where Website like :('%'+domain+'%') limit 1];"

As you can see, I only have bits and pieces of what I need.  I need your help to fill in the gaps and correct anything I've done wrong.  Also, if you've seen someone do something like this before, I'd love to see how they did!

Thanks!
Hi All,
when we want to export data into sf from apex data loader which option should be enable in profile?


Thanks,
viswa.
How can we make a vertical tab in visualforce page
Hi,
  What is the difference  between the <apex:Listview> and <apex:enhancedList>.


Thanks&Regards
​Ranga
User-added image
How to uplaod the csv file error 'BLOB is not a valid UTF-8 string' error