• Vempally
  • NEWBIE
  • 395 Points
  • Member since 2014


  • Chatter
    Feed
  • 4
    Best Answers
  • 2
    Likes Received
  • 3
    Likes Given
  • 55
    Questions
  • 66
    Replies
Hi folks,
         Can anyone tell me how to get the dependent picklist values based on the Controlling picklist value in Apex?
I need a sample code for that..


Thanks in advance
Karthick
Hi guys.
I started to learn Apex recently.
Then I found that many things can be write with case insensitive character.
Such as:
  • Object name:
    • You can write 
      public pagereference method1() { ..}
      instead of 
    • public PageReference method1() { ..}
  • Variable name
    • This will be compile error
    • Integer I;
      Integer i;
  • SOQL and SOSL statements
    • Account[] accts = [sELect ID From ACCouNT where nAme = 'fred'];
I refering to this : http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_variables.htm

Just to make sure, are there other case-insensitive things that can be happen on Apex ?
<apex:page standardcontroller="MPI_Category__c"  extensions="MPIController1" action="{!autoRun}"
  tabStyle="Contact">
  <style type="text/css">
  .m1{

   width: 60px;

}
</style>
   <apex:form >
   <apex:actionFunction name="rerenderSg1" rerender="sg1sSelectList1"  >
          <apex:param name="firstParam" assignTo="{!catalog}" value="" />
        
      </apex:actionFunction>
     
      <apex:sectionHeader title="MPI {!mpi.name}"  subtitle="MPI Item Selection" />
<apex:pageBlock >
   <table><tbody>
      <tr>
        <th>Catalog</th>
          <td>
             <apex:selectList id="catalog" styleclass="std" size="1"
                value="{!catalog}" onchange="rerenderSg1(this.value)" >
                    <apex:selectOptions value="{!catalogsSelectList}"/>
             </apex:selectList>
          </td>
          <th>Segment1</th>
          <td>
         
            <apex:selectList id="sg1sSelectList1" styleclass="std" size="1"
                 value="{!sg1}" >
                <apex:selectOptions value="{!sg1sSelectList1}"/>  
            </apex:selectList>
          
          </td>
    
     
      </tr>
     </tbody>
     </table>
       </apex:pageblock>
   </apex:form>
</apex:page>

public with sharing class MPIController1 {
public MPI_Category__c mpi {get;set;}
public MPI_Category__c mpiObject {get;set;}
public MPIProducts__c mpi1 {get;set;}
public Boolean sg4Bool {get;set;}
public Boolean sg3Bool {get;set;}
public Boolean sg2Bool {get;set;}
public Boolean sg1Bool {get;set;}
ApexPages.StandardController controller;
Public Boolean ShowpageBlockFlag{get;set;}
    public MPIController1(ApexPages.StandardController controller) {
    this.controller=controller;
     mpi=[Select  m.Name from MPI_Category__c m where m.id= :ApexPages.currentPage().getParameters().get('id')];
     mpiObject = new MPI_Category__c ();
mpiObject = (MPI_Category__c )controller.getRecord();

    }
public PageReference autoRun() {

      
        return null;

    }

    // Variables to store country and state selected by user
  
         public String catalog {get; set;}  
        
         public String sg1 {get;set;}
          public String sg2 {get;set;}
           public String sg3 {get;set;}
            public String sg4 {get;set;}
   
      // Generates catalog dropdown from country settings
        public List<SelectOption> getCatalogsSelectList()
         {
           List<SelectOption> options = new List<SelectOption>();
            options.add(new SelectOption('', '--SelectOne--'));       

           // Find all the catalogs in the custom setting
          List<product2> prd=  [select id, name, MPI_Catalog__c,MPI_Sg1__c,MPI_Sg2__c,MPI_Sg3__c,MPI_Sg4__c from product2 where MPI_Catalog__c!=null];
         
          set<String> s= new Set<String>();
         
         
         
         
        for(Product2 pr:prd)
        {
         s.add(pr.MPI_Catalog__c);
         
        }
       
        List<String> list1= new List<String>();
       
       
        list1.addAll(s);
       list1.sort();
      
           
            for(String s1:list1)
            {
            options.add(new SelectOption(s1, s1));
            }
        return options;
    }
   
    public List<SelectOption> getSg1sSelectList1() {
     List<SelectOption> options = new List<SelectOption>();
     options.add(new SelectOption('', '--SelectOne--'));  
     System.debug('catalog is -----'+catalog);
   
    List<product2> allsg1 =[select  MPI_Catalog__c,MPI_Sg1__c from product2 where MPI_Catalog__c=:catalog];
    Map<String,String> allSgValues= new Map<String,String>();
   
    for(Product2 p:allsg1)
    {
    if(p.MPI_Catalog__c==this.catalog)
    {
    allSgValues.put(p.MPI_Catalog__c,p.MPI_Sg1__c);
    options.add(new SelectOption(p.MPI_Catalog__c, p.MPI_Sg1__c));
    }
    System.debug('allSgValues are-----'+allSgValues);
    }
   
   
       
        // If no states are found, just say not required in the dropdown.
        if (options.size() > 0) {
      
            options.add(0, new SelectOption('', '--Select One--'));
           
        } else {
      
            options.add(new SelectOption('', 'Not Required'));
          
        }
        return options;
    }
   
   
   
    }

this is my page and controller, getSg1sSelectList1() is not renedering properly.so that Argument 1 canot be null cmg. help me on this
Hi All,

I want to access campaign field from lead object  to visualforce using custom controller. For this,is the right way to write trigger? Suppose If I write trigger then how to call trigger from visualforce?

Kindly support and suggest.

Thank You.
Hi Everyone

Iam working on Workflow Outbound messages which works between two salesforce orgs.
Created workflow outbound messages action for org1.
I got struck with creation of Listener for salesforce org2.

How to create a Outbound message listener...?

 
Hi Everyone,

Following is the code which is giving the said error in test class...
 
@isTest

Public Class QuoteDescription_Test{
    Static testMethod void test1(){
   
        Account acc1 = new Account(name = 'Account1');
        insert acc1;
       
        Opportunity opp1 = new Opportunity ();
        opp1.Name = 'Opportunity1';
        opp1.StageName = 'Prospecting';
        opp1.CloseDate = Date.newInstance(2016, 2, 6);
        insert opp1;
        
        Account acc = [Select id, name from Account];
        Opportunity opp = [Select id, name from Opportunity];
        
        Quote quo1 = new Quote();
        quo1.Name = 'Quote1';
        quo1.Accountid = acc.id;
        quo1.Opportunityid = opp.id;
        insert quo1;
        
        quo1.Status = 'Accepted';
        update quo1;
        
        
    }

}

 
Hi Everyone,

Iam writing a test class where I need to create a quote and insert it.
Now we have two read-only fields Opportunity and Account.

How can we assign values to these two fields?
@isTest

Public Class QuoteDescription_Test{
    Static testMethod void test1(){
   
       Account acc1 = new Account(name = 'Account1');
       insert acc1;
         
       Opportunity opp1 = new Opportunity ();
       opp1.Name = 'Opportunity1';
       opp1.StageName = 'Prospecting';
       opp1.CloseDate = Date.newInstance(2016, 2, 6);
       insert opp1;
        
       Quote quo1 = new Quote();
       quo1.Name = 'quote1';
       Account acc = [Select id, name from Account];
       quo1.Account = acc;
       quo1.Opportunity = 'Opportunity1';
       quo1.Status = 'Accepted';
       insert quo1;
    
    }
This gives an error

Error: Compile Error: Field is not writeable: Account at line 18 column 8
 
Hi Everyone,

We have an attachment to Account which is an excel file.(Not a CSV)
This excel file contains different sheets which contain contacts.(Different sheets different criteria).
Now on a custom button click i want a particular sheet's contacts to be inserted.

If its a single csv then iam aware of it but an excel file with different sheets.

regards
suresh.
Hi Everyone...

I came across a scenario which is as follows...

We have an excel file containing number of contacts as an attachment to Account...
Now, on a button click all the contacts available in th excel file wrt Account should get Inserted...

regards
Suresh.
Hi Everyone...

In Account sObject we have a field named "Phone"...
While Inserting Account a Contact should get created with the value given in field "Phone"...
When Updating the Account if I change the  Phone Number then a new contact with new phone number should get created...else nothing should happen...

regards,
Suresh
Hi everyone...
 
trigger CustomRollupSummary on Contact (after insert, after update, after delete, after undelete) {
	
    if(trigger.isInsert && Trigger.isAfter){
    List<Account> lst_accounts = new list<Account>();
    //decimal Value =0;
    set<id> account_ids = new set<id>();
    for(Contact c : trigger.new){
        account_ids.add(c.accountid);
        system.debug('account_ids' + account_ids);
    }
    Map<id, Account> map_accounts = new Map<id, Account>([select id, name from Account where id in : account_ids]);
    system.debug('map_accounts' + map_accounts);
    system.debug('map_accounts' + map_accounts.values());
        for(Account a : map_accounts.values()){
        system.debug('account' + a);
        a.Amount_Sum__c = 0;
    	//for(Contact c :[select id, name, amount__c from contact where accountid =: a.Id])
        for(Contact c : a.contacts)
    {
       system.debug('Contact' + c);
       
       a.Amount_Sum__c += c.amount__c;
    
    }
            lst_accounts.add(a);
    }
    system.debug('updated accounts' + lst_accounts);
    update lst_accounts;
    }
   /* List<Contact> lst_contacts = new  List<Contact>();
    for(Account a : lst_account){
        lst_contacts.add(a.contacts);
    	system.debug('lst_contacts');
    */
}

In the for loop where iam retrieving contacts based on an account, when SOQL is used its working fine but when the soql is replaced with a a.contacts the for loop is not getting executed... Why...?

 
Hi Everyone,

I've found the code for this at the following link,
http://developer.force.com/cookbook/recipe/overriding-a-page-for-some-but-not-all-users

but not able to understand the following "IF statement"
 
<apex:page action=
  "{!if($Profile.Name !='System Administrator', 
	null, 
	urlFor($Action.Account.Tab, $ObjectType.Account,
	null, true))}"
  standardController="Account" 
  recordSetVar="accounts" 
  tabStyle="Account">

  <!-- Replace with your markup -->  
	
  This page replaces your Account home page for 
  all users except Administrators.
</apex:page>

can anyone explain me what is happening in IF statement...
Iam a NEWBIE...

regards,
Suresh.
Hi Everyone,

Can anyone give the code and explanation where i need to udate parent field with the value calculated with child fields.

Eg: Rollup Summary for Sum(). Need trigger code fro this for understanding.
Hi Everyone,

If we have 10 users with permission to use Data Loader... I want to bypass validatios for a particular user...
How to achieve this...?
Hi Everyone,

In Batch Apex can anyone explain me what this <sObject> is needed for. what exactly it does...?

 
Hi everyone,

I came across an interview quetion where I was asked to use a WrapList in Batch Apex.

How to do it...?
Hi everyone,

As we know that, SOQL can fetch a max of 50,000 records in a single execution...and
a List can store upto 1000 records...

Now,
List<Account> lst_acc = new List<Account>([Select id, name from Account]);

If the SOQL gives me more than 1000 records, how can I store them to the List.
 
public with sharing class WrapPractice {

     public List<Wrapper> wrap_lst {get; set;}

    public List<Account> acc_lst {get; set;}
    
    public List<Wrapper> selected_lst {get; set;}


    public PageReference showSelected() {
    
        selected_lst = new List<Wrapper>();
        
        for(Wrapper w: wrap_lst)
            if(w.chk == true)
                selected_lst.add(w);
        system.debug(selected_lst);
        
        String lst_serialize = json.serialize(selected_lst);
        system.debug('serialised string  ' + lst_serialize);
        
        Pagereference pg = page.show_accounts;
        pg.getParameters().put('lst_serialize', lst_serialize);
        return pg;
    }

    

    public WrapPractice(){
    
        acc_lst = new List<Account>();
        
        acc_lst = [select id, name, accountnumber from Account];
        
        system.debug('Account List :'+ acc_lst);
        
        wrap_lst = new List<Wrapper>();
        
        for(Account acc : acc_lst)
         wrap_lst.add(new Wrapper(acc));
         
         system.debug('wraplist'+ wrap_lst);
        
    
    }
    
    Public Class Wrapper{
    
        public Boolean chk {get; set;}
        public Account acc {get; set;}
        
        public Wrapper (Account acc){
        
        this.acc = acc;
        chk = false;
        
        
        }
    
    }


}

VisualForce
 
<apex:page controller="WrapPractice">
<apex:form >
 <apex:pageBlock >
     <apex:pageBlockSection >
     
         <apex:commandButton value="show" action="{!showSelected}"/>
         <apex:pageBlockTable value="{!wrap_lst}" var="w">
             <apex:column >
             
                 <apex:inputCheckbox value="{!w.chk}"/>
             </apex:column>
             
             <apex:column >
             
                 <apex:outputField value="{!w.acc.id}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!w.acc.name}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!w.acc.accountnumber}"/>
             </apex:column>
         
         </apex:pageBlockTable>
     
     <apex:pageBlockTable value="{!selected_lst}" var="slst">
             <apex:column >
             
                 <apex:inputCheckbox value="{!slst.chk}"/>
             </apex:column>
             
             <apex:column >
             
                 <apex:outputField value="{!slst.acc.id}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!slst.acc.name}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!slst.acc.accountnumber}"/>
             </apex:column>
         
         </apex:pageBlockTable>
     </apex:pageBlockSection>
 
 </apex:pageBlock>
 </apex:form>
</apex:page>

 
Hi everyone
Iam trying to install software in eclipse i.e., Force.com IDE from the repository
http://media.developerforce.com/force-ide/eclipse42/ which gives following error

An error occurred while collecting items to be installed
Unable to read repository at http://media.developerforce.com/force-ide/eclipse42/plugins/com.salesforce.ide.apex.core_33.0.0.201504091124.jar.
Read timed out
Hi everyone,

I have just started integrating two sfdc orgs...

All that I need is a clear understanding of the apex classes generated from partner wsdl...

The class generated contains many inner classes and I want a clear understanding of these...

Can Anyone refer me some related docs ...
Hi Folks,

Plz check with the following code of a class for custom button on Account..

I need to get the contacts when account id is passed through the custom button to a global class.
 
Global class AccountContactFieldUpdate{

    public static Id accountid;
    public static List<Account> lst_acc;
   
   
    webservice static void contactFieldsConcat(Id accid){
        
        accountid = accid;
              
        string query ='select id, name, (select id, name from Contacts) from account where id =: accountid';
        lst_acc = Database.query(query);
        system.debug(lst_acc);
}

}

 
Hi Folks,

Whenever we create a custom field we go through 4 different pages where we start with
selecting the datatype -->CLICK NEXT --> Give name and label -->CLICK NEXT--> Security-->CLICK NEXT--> and finally select pagelayout and save.

why 4 different pages why not in a single page...?
Hi everyone,

My doubt maybe stupid but what i want to know is... can we get the relatedlist in a record detail page even if there is no relationship existing with any sobject...?
Hi Everyone,

I have a multiselect picklist with values 1 to 10
I have selected 1, 2, 8 and saved the first record.
For the next record I should not see the values 1, 2, 8 as they are already got selected and saved for the first record.
This needs to be achieved in the modal and not on VF.
Hi Everyone,

I've found the code for this at the following link,
http://developer.force.com/cookbook/recipe/overriding-a-page-for-some-but-not-all-users

but not able to understand the following "IF statement"
 
<apex:page action=
  "{!if($Profile.Name !='System Administrator', 
	null, 
	urlFor($Action.Account.Tab, $ObjectType.Account,
	null, true))}"
  standardController="Account" 
  recordSetVar="accounts" 
  tabStyle="Account">

  <!-- Replace with your markup -->  
	
  This page replaces your Account home page for 
  all users except Administrators.
</apex:page>

can anyone explain me what is happening in IF statement...
Iam a NEWBIE...

regards,
Suresh.
Hai Everyone...

Iam working on an e-commerce project and facing problem in shopping cart module as follows...

Adding and deleting products into and from the cart is working good...

but  when we close the app and open it again from the the same system the cart becomes empty which should not happen...

the cart should contain the added products in it...

cart is not an sObject...

How to achieve this...?

Hi everyone...
 
trigger CustomRollupSummary on Contact (after insert, after update, after delete, after undelete) {
	
    if(trigger.isInsert && Trigger.isAfter){
    List<Account> lst_accounts = new list<Account>();
    //decimal Value =0;
    set<id> account_ids = new set<id>();
    for(Contact c : trigger.new){
        account_ids.add(c.accountid);
        system.debug('account_ids' + account_ids);
    }
    Map<id, Account> map_accounts = new Map<id, Account>([select id, name from Account where id in : account_ids]);
    system.debug('map_accounts' + map_accounts);
    system.debug('map_accounts' + map_accounts.values());
        for(Account a : map_accounts.values()){
        system.debug('account' + a);
        a.Amount_Sum__c = 0;
    	//for(Contact c :[select id, name, amount__c from contact where accountid =: a.Id])
        for(Contact c : a.contacts)
    {
       system.debug('Contact' + c);
       
       a.Amount_Sum__c += c.amount__c;
    
    }
            lst_accounts.add(a);
    }
    system.debug('updated accounts' + lst_accounts);
    update lst_accounts;
    }
   /* List<Contact> lst_contacts = new  List<Contact>();
    for(Account a : lst_account){
        lst_contacts.add(a.contacts);
    	system.debug('lst_contacts');
    */
}

In the for loop where iam retrieving contacts based on an account, when SOQL is used its working fine but when the soql is replaced with a a.contacts the for loop is not getting executed... Why...?

 
Hi Everyone,

Can anyone give the code and explanation where i need to udate parent field with the value calculated with child fields.

Eg: Rollup Summary for Sum(). Need trigger code fro this for understanding.
public with sharing class WrapPractice {

     public List<Wrapper> wrap_lst {get; set;}

    public List<Account> acc_lst {get; set;}
    
    public List<Wrapper> selected_lst {get; set;}


    public PageReference showSelected() {
    
        selected_lst = new List<Wrapper>();
        
        for(Wrapper w: wrap_lst)
            if(w.chk == true)
                selected_lst.add(w);
        system.debug(selected_lst);
        
        String lst_serialize = json.serialize(selected_lst);
        system.debug('serialised string  ' + lst_serialize);
        
        Pagereference pg = page.show_accounts;
        pg.getParameters().put('lst_serialize', lst_serialize);
        return pg;
    }

    

    public WrapPractice(){
    
        acc_lst = new List<Account>();
        
        acc_lst = [select id, name, accountnumber from Account];
        
        system.debug('Account List :'+ acc_lst);
        
        wrap_lst = new List<Wrapper>();
        
        for(Account acc : acc_lst)
         wrap_lst.add(new Wrapper(acc));
         
         system.debug('wraplist'+ wrap_lst);
        
    
    }
    
    Public Class Wrapper{
    
        public Boolean chk {get; set;}
        public Account acc {get; set;}
        
        public Wrapper (Account acc){
        
        this.acc = acc;
        chk = false;
        
        
        }
    
    }


}

VisualForce
 
<apex:page controller="WrapPractice">
<apex:form >
 <apex:pageBlock >
     <apex:pageBlockSection >
     
         <apex:commandButton value="show" action="{!showSelected}"/>
         <apex:pageBlockTable value="{!wrap_lst}" var="w">
             <apex:column >
             
                 <apex:inputCheckbox value="{!w.chk}"/>
             </apex:column>
             
             <apex:column >
             
                 <apex:outputField value="{!w.acc.id}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!w.acc.name}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!w.acc.accountnumber}"/>
             </apex:column>
         
         </apex:pageBlockTable>
     
     <apex:pageBlockTable value="{!selected_lst}" var="slst">
             <apex:column >
             
                 <apex:inputCheckbox value="{!slst.chk}"/>
             </apex:column>
             
             <apex:column >
             
                 <apex:outputField value="{!slst.acc.id}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!slst.acc.name}"/>
             </apex:column>
             <apex:column >
             
                 <apex:outputField value="{!slst.acc.accountnumber}"/>
             </apex:column>
         
         </apex:pageBlockTable>
     </apex:pageBlockSection>
 
 </apex:pageBlock>
 </apex:form>
</apex:page>

 
Hi all,
Can you pls help me with the below errors i am getting. I am just trying to replace a field with a different field in the VF page. I have made all the necessary changes in Controller and helper class but i get this error in the first line :- Compile Error: unexpected token: 'public with sharing class  at line 1 column 0 both controller and helper classs pls help.
User-added image
User-added image

Pls Help.. Thanks in advance.Any help is highly appreciated
Thanks!!
 

public class A{
  public class B {
  }
  public class C {
       public A.B show(){}
  }
}

------------
Look above exampe. I have one inner class C.I need to create instance of that class.
Can any one help me to create instance of class C and call method show of class C.

 
Hello friends

I have workflow rule on Opportunity . In Account , I have custom field IsStage, Data Type=Text
In workflow , action item =field Update, if  StageName=Closed Won then this value should reflect in IsStage.

I have wriiten as follows but is show error. Can anyone let me know?
Account.IsStage__c =  CONTAINS(StageName, "Closed Won") 

Regards
Krishna
Hi folks,
         Can anyone tell me how to get the dependent picklist values based on the Controlling picklist value in Apex?
I need a sample code for that..


Thanks in advance
Karthick
Hi guys.
I started to learn Apex recently.
Then I found that many things can be write with case insensitive character.
Such as:
  • Object name:
    • You can write 
      public pagereference method1() { ..}
      instead of 
    • public PageReference method1() { ..}
  • Variable name
    • This will be compile error
    • Integer I;
      Integer i;
  • SOQL and SOSL statements
    • Account[] accts = [sELect ID From ACCouNT where nAme = 'fred'];
I refering to this : http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_variables.htm

Just to make sure, are there other case-insensitive things that can be happen on Apex ?
Hi,

i am trying to print the campaign member list in my vf page but it's giving me an error
Can anyone please help me?
below is my code..
<apex:page StandardController="Campaign"  extensions="CampaignMemController">
    <apex:form >
        <apex:pageBlock title="Campaign Members Details" mode="maindetail">
            <apex:pageBlockSection title="Campaign Members"  id="cm3">
                <apex:pageblocktable value="{!cm}" var="lead">
                        <apex:column headerValue="Name">
                            <apex:outputfield value="{!lead.Id}" />
                        </apex:column>
    
   </apex:pageblocktable>
                      </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
 
 
public with sharing class CampaignMemController {

    public Campaign camp {get; set; }
    list<contact> con = [SELECT id FROM contact];
    
    list<campaignmember> cmlist = [SELECT id, contactid FROM campaignmember];
    list<contact> conlist = new list<contact>();
     public CampaignMemController(ApexPages.StandardController controller) {
         camp  = (Campaign)controller.getRecord();
  
  
    for(campaignmember cm : cmlist)
{
     for(contact c : con)
    {
             if(c.id == cm.contactid)
                              conlist.add(c);
     }
    
//System.debug('All the campaignmemebers under contact '+con.name+'are'+camList );
        }  
    } 

}
Hi Team

I have a question so i am using <apex:outputlable> to display a label in the UI. So how can i make the background of entire lable to Black.??
Should i write css or is there any attribue in outputlable that support my requirement..Please let me know..Thanks in advance

User-added image

i reuire that when i click  on edit button (on right hand side) then only it shud show save button  but its showing save button before only.
how to do that.


<apex:commandLink value="Edit" action="{!enabledEditMode1}" style="margin-left: 69%">
     <apex:actionSupport event="onclick" reRender="panel1"/>
     </apex:commandLink>
    
   </div>
   <div class="panel-body">
   Email
  
  
 
    <apex:outputPanel id="panel1">
    <apex:commandButton action="{!save}" value="Save"/>
        <apex:outputfield value="{!account.Email__c}" style="margin-left: 60%"></apex:outputfield>
      <apex:inputField value="{!account.Email__c}"  rendered="{!isEdit1}" style="margin-left: 60%"></apex:inputField>

     </apex:outputPanel>
   </div>
Hi,

Could anyone prapose any setting/solution for below?
While writing the "Visualforce" page code given a controller & methods which are not created.
After it shown the error and option to create,Clicked on the option to created the expected code.
When move that tab the autogenerated code is overlapping & not in readable format.

  code overlappingCode
Hi All,

I want to access campaign field from lead object  to visualforce using custom controller. For this,is the right way to write trigger? Suppose If I write trigger then how to call trigger from visualforce?

Kindly support and suggest.

Thank You.
Hi all,

is there a formula I can use to rearrange characters in a text value?

The current text value = 890412

The formaula should change to = 12/04/89

Thanks
Hello,
I am a Salesforce admin with no development knowledge.

I would need some help with the following:

I am trying to update a multipicklist on lead/contact object after they become members of a campaign (of a certain record type). The campaign has a multipicklist with certains values and I want to add these values to the multipicklist of the lead/contact without deleting the values that were already stored in the field previously.

I'm not sure if that's clear... Any help would be greatly appreciated.
Many thanks.
hi All,
I want to add a pop up window on click when account is not selected. this is a list view page of account. and i am adding a custom button there.User-added image