• S Sai
  • NEWBIE
  • 90 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 49
    Questions
  • 61
    Replies
AFTER LEAD CONVERT IN OPPORTUNITY RECORD CREATE TWO CONACT ROLE RECORDS USING THIS TRIGGER.

I WANT TO CREATE ONLY ONE RECORD .

trigger CreateContactRole on Opportunity (after insert, after update) {

    //get the id of all involved accounts
    Set<ID> accountIds = new Set<ID>();
    for(Opportunity opt:Trigger.New){
        accountIds.add(opt.AccountId);
    }
    
    //get all contacts for those accounts
    list<Contact> contacts = new list<Contact>();
    contacts = [select id, AccountId from Contact where AccountId in: accountIds order by createddate Limit 5000];
    
    //organize these contacts by account
    Map<Id,List<Contact>> contactsByAccount = new Map<ID,List<Contact>>();
    for(Contact c:contacts){
        if(contactsByAccount.get(c.AccountId) == null){
            contactsByAccount.put(c.AccountId,new List<Contact>());
        }
        contactsByAccount.get(c.AccountId).add(c);
    }
    
    // check to see if the Opportunity already has a contact role.  If it does, add to a set of Ids to exclude
    List<OpportunityContactRole> existingOCR = new List<OpportunityContactRole>();
    Set<Id> existingOCRIds = new Set<Id>();
    existingOCR = [select OpportunityId from OpportunityContactRole where OpportunityId in:Trigger.newMap.keySet() limit 5000];
    for(OpportunityContactRole ocr:existingOCR) if(!existingOCRIds.contains(ocr.OpportunityId)) existingOCRIds.add(ocr.OpportunityId);
    
    //create the OpportunityContactRole objects
    list<OpportunityContactRole> lstOCR = new list<OpportunityContactRole>();
    for(Opportunity opt:Trigger.New){
        if(!existingOCRIds.contains(opt.Id) && contactsByAccount.get(opt.AccountId) != null){
            Boolean firstContact = true;
            for(Contact c: contactsByAccount.get(opt.AccountId)){
                OpportunityContactRole ocr = new OpportunityContactRole(OpportunityId=opt.id, ContactId=c.id);
                if(firstContact) {
                    ocr.IsPrimary = FALSE;
                    firstContact = FALSE;
                }
                lstOCR.add(ocr);
            }
        }
    }
    insert lstOCR;
}

THANKS IN ADVANCED 
 
  • April 11, 2017
  • Like
  • 0
update contacts one account to another account using batch class 
  • March 27, 2017
  • Like
  • 0
how to move contacts one account to another account in salesforce using batch class
  • March 24, 2017
  • Like
  • 0
Hi all,

please find the image when i am clicking the search button then display the serched number records in visualforce page please helpUser-added image
  • July 18, 2016
  • Like
  • 1
Hi All,

my requrment is here i am dispayinf contacts see below screen shot
User-added image
when i am clicking nex command link to display the selected record in next page 
Thanks and records
Sai
  • July 01, 2016
  • Like
  • 0
HI,

In case object i created one formula field. in this formula field i want to display case owner locale based on this soql query 
" select id,localesidkey from user where id in(select ownerid from case) "

Thanks 
SAi
  • May 20, 2016
  • Like
  • 1
hi 

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
    <GetCitiesByCountryResponse xmlns="http://www.webserviceX.NET">
    <GetCitiesByCountryResult>
    <NewDataSet>
            <Table>
        <Country>India</Country>
        <City>Bangalore</City>
      </Table>
    </NewDataSet>
    </GetCitiesByCountryResult>
    </GetCitiesByCountryResponse>
</soap:Body>
</soap:Envelope>

Thanks 
Sai
  • April 27, 2016
  • Like
  • 0
Hi All,
How to create page block sections in lighting components 
Thanks 
Sai
  • March 21, 2016
  • Like
  • 0
Hi
how to devide section blocks using lightning components  in salesforce 
Thanks
SAi
  • March 21, 2016
  • Like
  • 0
HI all, 

once i click the commandlink how to disable conmmandlink in visualforce 
 Thanks
Sai
  • February 17, 2016
  • Like
  • 0
Hi 

how to disable commnadlink after first click 

Thanks
Sai
  • February 17, 2016
  • Like
  • 0
Hi ,
public List<Employees> getUsers() {
        if(Users == null&& ProfileName == TRUE){
        Users = [select id,  user__r.name, delegate__r.Id, delegate__r.name, date_from__c , date_to__c from Employees where user__c = :Userinfo.getUserId()];
        }else {
        Users = [select id,  user__r.name, delegate__r.Id, delegate__r.name, date_from__c , date_to__c from Employees where user__c = :SelectedEmployeeId];
        }
        return null;
    }

how to write test class to above method

thanks
SS
  • February 15, 2016
  • Like
  • 0
HI how to write test class for this class 

public class CountryAccountRelatedContacts  {
        public id tobeEdited{get; set;}
        public String selectedcouId{get;set;}
        public String selectedAccId{get;set;}
        public string conid{get;set;}
        public boolean showPopup{ get; set; }
         public boolean isDownload {get;set;}
        
        public list<contact> lstcontact{get;set;}
        
        public PageReference Download(){
    isDownload = true;
      return null;
    }
        
         public List<SelectOption> getCountryNames() {
        
                 List<SelectOption> couOptions= new List<SelectOption>();
                          couOptions.add( new SelectOption('','--Select--'));
                          list<Country__c> cut = [select Id,name from Country__c];
                          for( Country__c  cou : cut ) {
                                  couOptions.add( new SelectOption(cou.Id,cou.name));
                          }
                         return couOptions;
                   }
           
   
        
               public List<SelectOption> getAccountNames() {
               system.debug('country ID'+selectedcouid);
                  List<SelectOption> accOptions= new List<SelectOption>();
                  List<SelectOption> options = new List<SelectOption>();
                  if(selectedcouId != null){
                  
                  list<account> act = [select Id,name,Country__c from account where Country__c=:selectedcouId order by name ASC ];
                  
                  for( Account acc : act  ) {
                          accOptions.add( new SelectOption(acc.Id,acc.name)); 
                  }
                  }
               else
                    {
                        accOptions.add( new SelectOption('--None--','--None--'));
                    }
             return accOptions;
       }
       
       
      public pagereference Submit(){
      
      lstcontact= new List<contact>();
      lstcontact= [SELECT ID,name, Firstname,lastname,email,phone,account.name from contact WHERE accountId=:selectedaccid order by name ASC];
      return null;
    }
    
    public PageReference openpopup() {
        showPopup =true;
        return null; 
    }
    public PageReference cancel() {
        showPopup =false;
        return null; 
    }
    public PageReference DeleteCon() {
        List<contact> con = [select id,name,Phone,accountid from contact where Id= :conid];
        delete con;
        showPopup =false;
       // contacts =new List<contact>();
        return null; 
    }
    
    
         public String getTobeEdited() {
        return null;
    }
    
     public PageReference Editable() {
        return null;
    }
    
    
    
    
  
    public void saveRecord(){
        Contact tobeupdated;
        for(Contact temp : lstcontact){
            if(temp.id==tobeEdited){
                tobeupdated = temp;   
                break;
            }
        }
        update tobeupdated;
        tobeEdited = null;
    }
}

Thanks 
SS
  • February 11, 2016
  • Like
  • 0
HI all,

My requirment is Import and Export same file in in viusualforce page. Here i am importing csv data in same data i want to export csv for example 

User-added imageUser-added image


<apex:page controller="importDataFromCSVController">
    <apex:form >
        <apex:pagemessages />
        <apex:pageBlock >
            <apex:pageBlockSection columns="4">
                  <apex:inputFile value="{!csvFileBody}"  filename="{!csvAsString}"/>
                  <apex:commandButton value="Import Account" action="{!importCSVFile}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
           <apex:pageblocktable value="{!accList}" var="acc">
              <apex:column value="{!acc.name}" />
              <apex:column value="{!acc.AccountNumber}" />
              <apex:column value="{!acc.Type}" />
              <apex:column value="{!acc.Accountsource}" />
              <apex:column value="{!acc.Industry }" />
        </apex:pageblocktable>
     </apex:pageBlock>
   </apex:form>
</apex:page>



public class importDataFromCSVController {
public Blob csvFileBody{get;set;}
public string csvAsString{get;set;}
public String[] csvFileLines{get;set;}
public List<account> acclist{get;set;}
  public importDataFromCSVController(){
    csvFileLines = new String[]{};
    acclist = New List<Account>();
  }
  
  public void importCSVFile(){
       try{
           csvAsString = csvFileBody.toString();
           csvFileLines = csvAsString.split('\n');
            
           for(Integer i=1;i<csvFileLines.size();i++){
               Account accObj = new Account() ;
               string[] csvRecordData = csvFileLines[i].split(',');
               accObj.name = csvRecordData[0] ;            
               accObj.accountnumber = csvRecordData[1];
               accObj.Type = csvRecordData[2];
               accObj.AccountSource = csvRecordData[3];  
               accObj.Industry = csvRecordData[4];                                                                            
               acclist.add(accObj);  
           }
        //insert acclist;
        }
        catch (Exception e)
        {
            ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.ERROR,'An error has occured while importin data Please make sure input csv file is correct');
            ApexPages.addMessage(errorMessage);
        } 
  }
}


here i want to export same data in csv..

Thanks 
SS
 
  • February 08, 2016
  • Like
  • 0
HI all,

When i am not filling  any <apex:inputTex> text field then i Want to display validation error using apex visualforce page
Like below  

User-added image
Thanks 
SS
  • February 02, 2016
  • Like
  • 0
Hi all,
My requirement is when user selected object in a picklist and import the through visualforce page
Thanks
SS
 
  • January 29, 2016
  • Like
  • 0
Hi All,

i want to display dependent pick list in a table. In a table having 2 picklist Columns when i am selecting table column picklist1 then display the table column2 pick list values

Thanks
SS 
  • January 21, 2016
  • Like
  • 0
HI all,

what is @Remoteaction why we are using this in controller 

any one  could you please explain 


Thanks 
SS
  • November 23, 2015
  • Like
  • 0
HI ,

User-added image

 i am creating tabs like products, orders and  merchandise  when iam clicking product tab it display the product details in table format. here i am sending my code 

<apex:page controller="yourcontroller" standardstylesheets="false" showheader="false"  applyBodyTag="false" docType="html-5.0">
<style>
body{
background-color :grey;
}
  ul#menu {
    padding: 30px 50px;
}

ul#menu li {
    display: inline;
  
}
ul#menu li a {
    background-color: orange;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius:  4px 4px 0 0  ;
}
ul#menu li a:hover {
    background-color: Blue;
}
#main {
    padding: 0;
    padding-left:  15px;
    padding-right: 15px;
    background-color: #ffffff;
    border-radius:  5px 5px;
}
</style>
<apex:form >
<body>
<ul id="menu" >
                      <li><a href="#" >Products</a></li>
                      <li><a href="#" >Orders</a></li>
                      <li><a  href="#">Merchandise</a></li>
                      <li><a href="#">PHP</a></li>
                </ul> 
             </body>
            </apex:form>
</apex:page>

Please help


Thanks 
SS
  • November 18, 2015
  • Like
  • 0
hi 

PAGE
-------------
<apex:page controller="css" showHeader="false" applyBodyTag="false" docType="html-5.0" sidebar="false" standardStylesheets="false" >
        <apex:form >
                <b> Select Account Name : </b>
                <apex:selectList value="{!selectedaccid}" size="1" style="margin: 45px 25px 0;width: 200px;" styleClass="easyui-combobox"> 
                <apex:selectOptions value="{!AccountNames}"/>
                </apex:selectList>
               <apex:commandButton value="ShowContacts"  rerender="out" /><br/>
                <apex:actionSupport event="onchange" reRender="a" />
       <apex:outputPanel id="out"> 
        <table width="100%" border = "1" bordercolor="#DCE1E6"  cellpadding="5" cellspacing="0">
            <tr align="center">
                    <th scope="col" align="center" bgcolor = "#FFBBFF" >Name</th>
            <th scope="col" align="center" bgcolor = "#FFBBFF">Email</th>
             </tr> 
             <apex:repeat value="{!ContactList}" var="con">
                <tr>
                    <td align="center" style="color:black;">{!con.name}</td>
                                <td align="center" style="color:black;">{!con.email}</td>
                    
                </tr>  
            
            </apex:repeat>
            </table>      
        </apex:outputPanel>  
     </apex:form>
        </apex:page>

Controller 
------------

public class css{

    public String getContact() {
        return null;
    }


    public String us { get; set; }
        
        public String selectedAccId{get;set;}
        public integer consize {get;set;}
        
            
        

        public List<SelectOption> getaccountNames() {
        List<SelectOption> acccOptions= new List<SelectOption>();
        acccOptions.add( new SelectOption('','--Select--'));
        list<account> acc= [select Id,name from account];
        for( account  ac: acc) {
        acccOptions.add( new SelectOption(ac.Id,ac.name));
        }
        return acccOptions;
        }
    
        
               
        
        Public List<contact> getContactList(){
        List<Contact> conlist=[SELECT ID,name, Firstname,lastname,email,phone,accountId from contact WHERE accountId=:selectedaccid];
        
        consize =conlist.size();
       if(conlist.size() >0){
                return conlist;
          }else{
          return null;
         }    
                }
        }


here i want to create in contact table create edit delete command link when i am click the delete command link then show popup  window 

thanks 
SS
  • November 02, 2015
  • Like
  • 0
Hi all,

please find the image when i am clicking the search button then display the serched number records in visualforce page please helpUser-added image
  • July 18, 2016
  • Like
  • 1
HI,

In case object i created one formula field. in this formula field i want to display case owner locale based on this soql query 
" select id,localesidkey from user where id in(select ownerid from case) "

Thanks 
SAi
  • May 20, 2016
  • Like
  • 1
AFTER LEAD CONVERT IN OPPORTUNITY RECORD CREATE TWO CONACT ROLE RECORDS USING THIS TRIGGER.

I WANT TO CREATE ONLY ONE RECORD .

trigger CreateContactRole on Opportunity (after insert, after update) {

    //get the id of all involved accounts
    Set<ID> accountIds = new Set<ID>();
    for(Opportunity opt:Trigger.New){
        accountIds.add(opt.AccountId);
    }
    
    //get all contacts for those accounts
    list<Contact> contacts = new list<Contact>();
    contacts = [select id, AccountId from Contact where AccountId in: accountIds order by createddate Limit 5000];
    
    //organize these contacts by account
    Map<Id,List<Contact>> contactsByAccount = new Map<ID,List<Contact>>();
    for(Contact c:contacts){
        if(contactsByAccount.get(c.AccountId) == null){
            contactsByAccount.put(c.AccountId,new List<Contact>());
        }
        contactsByAccount.get(c.AccountId).add(c);
    }
    
    // check to see if the Opportunity already has a contact role.  If it does, add to a set of Ids to exclude
    List<OpportunityContactRole> existingOCR = new List<OpportunityContactRole>();
    Set<Id> existingOCRIds = new Set<Id>();
    existingOCR = [select OpportunityId from OpportunityContactRole where OpportunityId in:Trigger.newMap.keySet() limit 5000];
    for(OpportunityContactRole ocr:existingOCR) if(!existingOCRIds.contains(ocr.OpportunityId)) existingOCRIds.add(ocr.OpportunityId);
    
    //create the OpportunityContactRole objects
    list<OpportunityContactRole> lstOCR = new list<OpportunityContactRole>();
    for(Opportunity opt:Trigger.New){
        if(!existingOCRIds.contains(opt.Id) && contactsByAccount.get(opt.AccountId) != null){
            Boolean firstContact = true;
            for(Contact c: contactsByAccount.get(opt.AccountId)){
                OpportunityContactRole ocr = new OpportunityContactRole(OpportunityId=opt.id, ContactId=c.id);
                if(firstContact) {
                    ocr.IsPrimary = FALSE;
                    firstContact = FALSE;
                }
                lstOCR.add(ocr);
            }
        }
    }
    insert lstOCR;
}

THANKS IN ADVANCED 
 
  • April 11, 2017
  • Like
  • 0
Hi all,

please find the image when i am clicking the search button then display the serched number records in visualforce page please helpUser-added image
  • July 18, 2016
  • Like
  • 1
HI,

In case object i created one formula field. in this formula field i want to display case owner locale based on this soql query 
" select id,localesidkey from user where id in(select ownerid from case) "

Thanks 
SAi
  • May 20, 2016
  • Like
  • 1
hi 

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
    <GetCitiesByCountryResponse xmlns="http://www.webserviceX.NET">
    <GetCitiesByCountryResult>
    <NewDataSet>
            <Table>
        <Country>India</Country>
        <City>Bangalore</City>
      </Table>
    </NewDataSet>
    </GetCitiesByCountryResult>
    </GetCitiesByCountryResponse>
</soap:Body>
</soap:Envelope>

Thanks 
Sai
  • April 27, 2016
  • Like
  • 0
Hi
how to devide section blocks using lightning components  in salesforce 
Thanks
SAi
  • March 21, 2016
  • Like
  • 0
HI all, 

once i click the commandlink how to disable conmmandlink in visualforce 
 Thanks
Sai
  • February 17, 2016
  • Like
  • 0
Hi 

how to disable commnadlink after first click 

Thanks
Sai
  • February 17, 2016
  • Like
  • 0
HI how to write test class for this class 

public class CountryAccountRelatedContacts  {
        public id tobeEdited{get; set;}
        public String selectedcouId{get;set;}
        public String selectedAccId{get;set;}
        public string conid{get;set;}
        public boolean showPopup{ get; set; }
         public boolean isDownload {get;set;}
        
        public list<contact> lstcontact{get;set;}
        
        public PageReference Download(){
    isDownload = true;
      return null;
    }
        
         public List<SelectOption> getCountryNames() {
        
                 List<SelectOption> couOptions= new List<SelectOption>();
                          couOptions.add( new SelectOption('','--Select--'));
                          list<Country__c> cut = [select Id,name from Country__c];
                          for( Country__c  cou : cut ) {
                                  couOptions.add( new SelectOption(cou.Id,cou.name));
                          }
                         return couOptions;
                   }
           
   
        
               public List<SelectOption> getAccountNames() {
               system.debug('country ID'+selectedcouid);
                  List<SelectOption> accOptions= new List<SelectOption>();
                  List<SelectOption> options = new List<SelectOption>();
                  if(selectedcouId != null){
                  
                  list<account> act = [select Id,name,Country__c from account where Country__c=:selectedcouId order by name ASC ];
                  
                  for( Account acc : act  ) {
                          accOptions.add( new SelectOption(acc.Id,acc.name)); 
                  }
                  }
               else
                    {
                        accOptions.add( new SelectOption('--None--','--None--'));
                    }
             return accOptions;
       }
       
       
      public pagereference Submit(){
      
      lstcontact= new List<contact>();
      lstcontact= [SELECT ID,name, Firstname,lastname,email,phone,account.name from contact WHERE accountId=:selectedaccid order by name ASC];
      return null;
    }
    
    public PageReference openpopup() {
        showPopup =true;
        return null; 
    }
    public PageReference cancel() {
        showPopup =false;
        return null; 
    }
    public PageReference DeleteCon() {
        List<contact> con = [select id,name,Phone,accountid from contact where Id= :conid];
        delete con;
        showPopup =false;
       // contacts =new List<contact>();
        return null; 
    }
    
    
         public String getTobeEdited() {
        return null;
    }
    
     public PageReference Editable() {
        return null;
    }
    
    
    
    
  
    public void saveRecord(){
        Contact tobeupdated;
        for(Contact temp : lstcontact){
            if(temp.id==tobeEdited){
                tobeupdated = temp;   
                break;
            }
        }
        update tobeupdated;
        tobeEdited = null;
    }
}

Thanks 
SS
  • February 11, 2016
  • Like
  • 0
HI all,

My requirment is Import and Export same file in in viusualforce page. Here i am importing csv data in same data i want to export csv for example 

User-added imageUser-added image


<apex:page controller="importDataFromCSVController">
    <apex:form >
        <apex:pagemessages />
        <apex:pageBlock >
            <apex:pageBlockSection columns="4">
                  <apex:inputFile value="{!csvFileBody}"  filename="{!csvAsString}"/>
                  <apex:commandButton value="Import Account" action="{!importCSVFile}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
           <apex:pageblocktable value="{!accList}" var="acc">
              <apex:column value="{!acc.name}" />
              <apex:column value="{!acc.AccountNumber}" />
              <apex:column value="{!acc.Type}" />
              <apex:column value="{!acc.Accountsource}" />
              <apex:column value="{!acc.Industry }" />
        </apex:pageblocktable>
     </apex:pageBlock>
   </apex:form>
</apex:page>



public class importDataFromCSVController {
public Blob csvFileBody{get;set;}
public string csvAsString{get;set;}
public String[] csvFileLines{get;set;}
public List<account> acclist{get;set;}
  public importDataFromCSVController(){
    csvFileLines = new String[]{};
    acclist = New List<Account>();
  }
  
  public void importCSVFile(){
       try{
           csvAsString = csvFileBody.toString();
           csvFileLines = csvAsString.split('\n');
            
           for(Integer i=1;i<csvFileLines.size();i++){
               Account accObj = new Account() ;
               string[] csvRecordData = csvFileLines[i].split(',');
               accObj.name = csvRecordData[0] ;            
               accObj.accountnumber = csvRecordData[1];
               accObj.Type = csvRecordData[2];
               accObj.AccountSource = csvRecordData[3];  
               accObj.Industry = csvRecordData[4];                                                                            
               acclist.add(accObj);  
           }
        //insert acclist;
        }
        catch (Exception e)
        {
            ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.ERROR,'An error has occured while importin data Please make sure input csv file is correct');
            ApexPages.addMessage(errorMessage);
        } 
  }
}


here i want to export same data in csv..

Thanks 
SS
 
  • February 08, 2016
  • Like
  • 0
Hi All,

i want to display dependent pick list in a table. In a table having 2 picklist Columns when i am selecting table column picklist1 then display the table column2 pick list values

Thanks
SS 
  • January 21, 2016
  • Like
  • 0
HI ,

User-added image

 i am creating tabs like products, orders and  merchandise  when iam clicking product tab it display the product details in table format. here i am sending my code 

<apex:page controller="yourcontroller" standardstylesheets="false" showheader="false"  applyBodyTag="false" docType="html-5.0">
<style>
body{
background-color :grey;
}
  ul#menu {
    padding: 30px 50px;
}

ul#menu li {
    display: inline;
  
}
ul#menu li a {
    background-color: orange;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius:  4px 4px 0 0  ;
}
ul#menu li a:hover {
    background-color: Blue;
}
#main {
    padding: 0;
    padding-left:  15px;
    padding-right: 15px;
    background-color: #ffffff;
    border-radius:  5px 5px;
}
</style>
<apex:form >
<body>
<ul id="menu" >
                      <li><a href="#" >Products</a></li>
                      <li><a href="#" >Orders</a></li>
                      <li><a  href="#">Merchandise</a></li>
                      <li><a href="#">PHP</a></li>
                </ul> 
             </body>
            </apex:form>
</apex:page>

Please help


Thanks 
SS
  • November 18, 2015
  • Like
  • 0
hi 

PAGE
-------------
<apex:page controller="css" showHeader="false" applyBodyTag="false" docType="html-5.0" sidebar="false" standardStylesheets="false" >
        <apex:form >
                <b> Select Account Name : </b>
                <apex:selectList value="{!selectedaccid}" size="1" style="margin: 45px 25px 0;width: 200px;" styleClass="easyui-combobox"> 
                <apex:selectOptions value="{!AccountNames}"/>
                </apex:selectList>
               <apex:commandButton value="ShowContacts"  rerender="out" /><br/>
                <apex:actionSupport event="onchange" reRender="a" />
       <apex:outputPanel id="out"> 
        <table width="100%" border = "1" bordercolor="#DCE1E6"  cellpadding="5" cellspacing="0">
            <tr align="center">
                    <th scope="col" align="center" bgcolor = "#FFBBFF" >Name</th>
            <th scope="col" align="center" bgcolor = "#FFBBFF">Email</th>
             </tr> 
             <apex:repeat value="{!ContactList}" var="con">
                <tr>
                    <td align="center" style="color:black;">{!con.name}</td>
                                <td align="center" style="color:black;">{!con.email}</td>
                    
                </tr>  
            
            </apex:repeat>
            </table>      
        </apex:outputPanel>  
     </apex:form>
        </apex:page>

Controller 
------------

public class css{

    public String getContact() {
        return null;
    }


    public String us { get; set; }
        
        public String selectedAccId{get;set;}
        public integer consize {get;set;}
        
            
        

        public List<SelectOption> getaccountNames() {
        List<SelectOption> acccOptions= new List<SelectOption>();
        acccOptions.add( new SelectOption('','--Select--'));
        list<account> acc= [select Id,name from account];
        for( account  ac: acc) {
        acccOptions.add( new SelectOption(ac.Id,ac.name));
        }
        return acccOptions;
        }
    
        
               
        
        Public List<contact> getContactList(){
        List<Contact> conlist=[SELECT ID,name, Firstname,lastname,email,phone,accountId from contact WHERE accountId=:selectedaccid];
        
        consize =conlist.size();
       if(conlist.size() >0){
                return conlist;
          }else{
          return null;
         }    
                }
        }


here i want to create in contact table create edit delete command link when i am click the delete command link then show popup  window 

thanks 
SS
  • November 02, 2015
  • Like
  • 0
Hi Good Morning,

In visualforce Page i Want to create Picklist Values of publicGroup.when iam selecting and serch button then show the particular publicgroup users

Thanks
SS
  • October 26, 2015
  • Like
  • 0
HI 
how to create approval history manual 


thanks
SS 
 
  • October 22, 2015
  • Like
  • 0