• ravi1234.ax1565
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 23
    Replies

Hi Group,

 

   Do we have any option to disable Quick Text . Can anyone help me regarding this

 

 

Thanks for giving reply(In advance)

 

 

Hi community,

 

                    I have a parent object for lead object. If i convert a Lead , the record moves to opportunity. But we cant see the parent record of lead in opportunity . 

 

                       My requirement is i wanna see the record of lead with assocoiated parent in opportunity record detail page how can i achieve this. pls guide me to right way to achieve this.

 

   Thanks for giving reply(in advance)

Hello community,

 

                          i have a doubt related to portals  that is how the System Admin knows wether the partner login in partner portal or customer login in customer portal

 

 thanks for giving reply (in advance)

 

        

Hello Community,

 

                Can any one briefly explain about VF life cycle and order of execution in detail

 

 

                  thanks for giving reply (In Advance)

 

 

       Thanks and Regards

         

 

                

Hi community,

 

 

          I wanna send an email when a field is upadated on a single sobject how can i achieve this........

 

        pls guide me to the right way to achieve this.....

 

Note:: Field Updation must be define by us only in the sense  when field is updated an email must delivers to a particular user

 

Thanks&Regards

 

Hello Group,

 

                 I have Faculty(Name, Status("Available", "Assigned")) and Schedule(Name , Faculty, From Date, To Date) Sobjs

 so, My requirement is when i create a Faculty record with Satus is "Available" and it should change to "Assigned" one day after  ToDate . I have tried to achieve this  but iam not able to reach my requirement....

 

       Please help  me how to achieve this in a detail way

 

     Thanks for giving reply (in advance)

 

 

          Thanks and Regards

 

    

Hello Group ,

 

                         I wanna display selected records in vf page by clicking custom button in page layout.  To achieve this i created a custom button in page layout and a visualforce page(standard controller) but iam getting   

all records in vf page when i click on a custom button in page layout.

 

 Note : when i click that custom button it displays a vf page with all records but i want only selected records 

 

     pls help me to achieve this 

 

   thanks fopr giving reply (in advance)

hello group,

                       i have 2 custom objects (Student,faculty) when i select student, the fields related to student has  to be displayed in another picklist...............

 

                        how can i retrieve some selected custom object name in a picklist...........

 

                             pls send me code for this requirement...

 

                         thansk for giving reply(in advance)

 

                               

hello group,

 

              i hav one s-obj position in that i hav 3 picklist fields Functional Area, Job Level and Var.

 

                  Functional Area is controlling field of Job Level, 

 

                  and Job Level is controlling field of Var.

                  i retrieved these fields in vf page

               when i select one value in Functional Area the controling value in Job Level displays upto now i feel happy

             and when i select a value in Job Level the controlling value in Var displays, instaed that Var(picklist), a value can be displayed in text box that must be read only.(value is related to Var(pick list)).........

 

       plsa send me code for this.....

     iam new to the salesforce......

 

    thanks for giving reply(in advance)

 

 

 

 

 hello group

 

                 i hav enquiry page displayed a  picklist field (select course(retrievd 'Name' from another s-obj (course)))  in vf page. so my requirement is when i click save in vf page it must enter in to enquiry object a field a called Preffered_Courses__c(text).

 

i hav used below code to display a picklist field ..............

 

 

<apex:outputLabel style="font-weight:Bold" value="Select a course :">
          <apex:SelectList size="1" value="{!course}">
          <apex:selectOptions value="{!items}"/>
          </apex:SelectList>
        </apex:outputLabel>

-----------------------------------------------------------------------------------------------

 

 public String course {get; set;}
    public List<SelectOption> getItems(){
           
        List<SelectOption> options = new List<SelectOption>();
    List<Course__C> lst = [select Name from Course__c];
     options.add(new SelectOption('--Select Course--','--Select Course--'));
    if(lst != null){
        for(Integer i=0; i < lst.size(); i++){
        
            options.add(new SelectOption(lst[i].Name,lst[i].Name));
        }
        }
        return options;
    }

-------------------------------------------------------------------------------------------------------------------------------

 

  my requirement is when i save record in vf page select courses field in vf page must enter in to enquiry object(Preffered_Courses__c(text).)

 

 pls send me code for this . Iam new to salesforce

 

 pls guide me to r8 way to achive my requirement

 

 thanks for giving reply (in advance)............

 

 

 

 hello group ,

 

  can we create a user using trigger, if possible how ,

 

              if not why?

 

                            help full to me if any code references 

      

   thanks for giving reply in advance

 

 

                thanks and regerds

          

hello group ,

 

 

          can we create a user using trigger, if possible how ,

 

              if not why?

 

                            help full to me if any code references 

      

   thanks for giving reply in advance

 

 

                thanks and regerds

           

 hello group,

            

                      i hav two s-obj enquiry and student. in enquiry i want a picklist called course. iam trying to retrieve course name  from course obj in enquiry (picklist). but i dont have any picklist in  enquiry related to course name picklist in datamodel. and also there is no relationship between two s-obj. is this possilbe to retrieve a field from one s-obj to another one in to picklist with out any relationship....

 

               
pls guide in a r8 way

 

     thanks for giving reply(in advance)          

hello group,

 

        i have 2 obj enquiry and course i developed 2 pages for both enquiry and course . In enquiry page  i want to have picklist field  'select course',

        but iam not able to execute perfectly.........

         pls go through my below code and  resolve my  prblm

 

      <apex:outputLabel style="font-weight:Bold" value="Select a course :" />
     <apex:SelectList size="1" value="{!lst}">
     <apex:selectOptions value="{!items}"/>
     </apex:SelectList>

    ----------------------------------------------------------------------------------------------

    public List<Course__c> lst{get;set;}

    public Course__C getlst() {
      if (lst == null) {
        lst = [select Name from Course__c];
          }
        return lst;
       }
    }

    public List<SelectOption> getItems(){
           
        List<SelectOption> options = new List<SelectOption>();
        for(Integer i=0; i < lst.size(); i++){
        
            options.add(new SelectOption(lst[i].Name,lst[i].Name));
        }
        
        return options;
    }

 

  iam getting an error that 'un expected token ' at line 'public List<SelectOption> getItems(){'

 

 

note: i dont have a field picklist in my enquiry obj... but i wanrt to display it in vf page is this possible to do

 

 

       pls help me ............

 

 thanks for giving reply in advance

 

     

 

 

hello group,

 

 

               i hav developed 2 vf pages enquiry and student, in enquiry i hav a picklist field called status(converted,pending, not converted).and also i hav some records in enquiry. so my requirement is when i click converted in status piclist,

the records associated with 'convetred' should move from 'enquiry' to 'student'.

      pls send me code for this requirement 

             can any one help me ,

 

           thanks for giving reply(in advance)

  hi group,

      can any one help me to solve my error i.e, i want to delete selected records in my pageblock table.

     pls check my below code and correct it .......

 

-----------------------------------------------------------------------------------------------------------------------------------------------------

 

<apex:page tabStyle="Campaign__c" controller="Camp" showHeader="false">
 
  <script language="javascript">
   <apex:includeScript value="/soap/ajax/15.0/connection.js"/>
   <apex:includeScript value="/soap/ajax/15.0/apex.js"/>
 
     var idsToDelete = {!GETRECORDIDS( $ObjectType.Campaign__c)};
     var deleteWarning= 'Are you sure you wish to delete ' +idsToDelete.length+ ' Records?';
     if(idsToDelete.length &amp;&amp; (window.confirm(deleteWarning))) {
        sforce.connection.deleteIds(idsToDelete,function(){
               navigateToUrl(window.location.href);
               });
              }
     else if (idsToDelete.length == 0){
        alert("Please select the contacts you wish to delete.!!");
      }

  </script>
  <!-- Javascript function to check all rows in the table -->
 <script>
        function checkAll(cb){
            var inputElem = document.getElementsByTagName("input");
            for(var i=0; i<inputElem.length; i++){
            if(inputElem[i].id.indexOf("checkedone")!=-1)
                inputElem[i].checked = cb.checked;
            }    
        }                                                                                                
    </script>
  <!-- End of Javascript function -->

 <apex:form >
    <apex:pageMessages ></apex:pageMessages>
       <apex:sectionHeader title="Campaign"/>
        <apex:pageBlock title="RecentCampaigns" rendered="{!RecentCampaignforms}">
        
          <apex:pageBlockButtons location="top">
           <div>
            <left>
              <apex:commandButton value="New" action="{!campaignnew}"/>
              <apex:commandButton value="Delete Selected" action="{!deleteselected}"/>
            </left>
           </div>                                                             
          </apex:pageBlockButtons>
          
      
        <apex:pageBlockTable value="{!CampaignList}" var="c" >
           <apex:column >
           <apex:facet name="header">
              <apex:inputCheckbox >
               <apex:actionSupport event="onclick" action="{!deleteselected}" onsubmit="checkAll(this)" reRender="Campaign__c"  />
               </apex:inputCheckbox>
             </apex:facet>
             <apex:inputCheckbox id="checkedone" >
             <apex:actionSupport event="onclick" action="{!deleteselected}" reRender="Campaign__c"/>
             </apex:inputCheckbox>
             </apex:column>
            <apex:column headerValue="Action">       
                    <apex:commandLink value="Edit" action="{!Edit}" id="edit"/>
                   
                    <!--<apex:outputLink value="/{!c.id}/e?retURL=/apex/{!$CurrentPage.Name}" style="font-weight:bold" >Edit</apex:outputLink>-->
                    <!--<a href="javascript&colon;if (window.confirm('Are you sure?')) Deletecampaign('{!cl.Id}');" style="font-weight:bold" >Del</a>-->
            </apex:column>
            
            <apex:column headerValue="Campaign Name">
              <apex:outputField value="{!c.Name}"/>
            </apex:column>
            <apex:column headerValue="Adress">
              <apex:outputField value="{!c.Address__c}"/>
            </apex:column>
            <apex:column headerValue="Status">
              <apex:outputField value="{!c.Status__c}"/>
            </apex:column>
            <apex:column headerValue="Start Date">
              <apex:outputField value="{!c.Start_date__c}"/>
            </apex:column>
            <apex:column headerValue="End Date">
              <apex:outputField value="{!c.End_date__c}"/>
            </apex:column>
            <apex:column headerValue="Campaign Budget">
              <apex:outputField value="{!c.Campaign_budget__c}"/>
            </apex:column>
            <apex:column headerValue="Type">
              <apex:outputField value="{!c.Type__c}"/>
            </apex:column>
            <apex:column headerValue="Campaign Duration">
              <apex:outputField value="{!c.Campaign_Duration__c}"/>
            </apex:column>
          </apex:pageBlockTable>
         
      </apex:pageBlock>    
    

           <apex:pageBlock title="Campaign Edit" rendered="{!Newcampaignsform}" mode="Edit">
          
           <apex:pageBlockButtons >
                <apex:commandButton value="save" action="{!save}"/>
                <apex:commandButton value="save&new" action="{!quicksave}"/>
                <apex:commandButton value="cancel" action="{!cancel}" immediate="true"/>
           </apex:pageBlockButtons>
            
           <apex:pageBlockSection title="Information" columns="1" >
             <apex:inputField value="{!cmp.Name}" required="true"/>
             <apex:inputField value="{!cmp.Address__c}"/>
             <apex:inputField value="{!cmp.Status__c}"/>
             <apex:inputField value="{!cmp.Start_date__c}"/>
             <apex:inputField value="{!cmp.End_date__c}"/>
             <apex:inputField value="{!cmp.Campaign_budget__c}"/>
             <apex:inputField value="{!cmp.Type__c}"/>     
           </apex:pageBlockSection>
           
        </apex:pageBlock>
    </apex:form>
</apex:page>

---------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

public class Camp {

     
     public boolean RecentCampaignforms{get;set;}
     public boolean Newcampaignsform{set;get;}         
     public list<Campaign__c> dellist;
     public Campaign__c cmp{get;set;}
     public boolean selected{set;get;}
     public list<Campaign__C> edit;
     
      public Camp (){
       RecentCampaignforms = true;
       Newcampaignsform = false;
       getCampaignList();
       }
       
     public void Campaignnew(){
       RecentCampaignforms = false;
       Newcampaignsform = true;
       cmp = new Campaign__c();
       
       }
     Public pageReference Edit(){
       cmp = new Campaign__c();
       pagereference pageref = new pagereference('https://c.ap1.visual.force.com/apex/camp');  //acc.id is the current record for update
       pageref.setredirect(true);
       return pageref;
 
       }
   
       public void Save(){
        insert cmp;
        RecentCampaignforms=true;
        NewCampaignsForm=false;
       }
    public void QuickSave(){
        insert cmp;
        RecentCampaignforms=false;
        NewCampaignsForm=true;
       }
    
    public void Cancel(){
        RecentCampaignforms=true;
        NewCampaignsForm=false;
       }
    
    
    //-----------Code for RecentCampaigns
    
    
    public list<Campaign__c> CampaignList = new list<Campaign__c>();
    public list<Campaign__c> getCampaignList(){
     CampaignList=[SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c];
     return CampaignList;
       }     
     
   //--- code for delete
   
    public list<cCampaign> cmpList {get;set;}
    public List<cCampaign> getcampaigns() {

        if(cmpList == null) {
            cmpList = new List<cCampaign>();
            for(Campaign__c c: [SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c]) {
                cmpList.add(new cCampaign(c));

            }

        }

        return cmpList;

    }
    public PageReference deleteselected() {
      
       
    return null;
    }
    
       /*List<Campaign__c> selectedcampaigns = new List<Campaign__c>();
             for(cCampaign cCam: getCampaigns()) {
               if(cCam.selected == true) {
               
               selectedcampaigns.add(cCam.cam);
               dellist = [SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c];
               delete dellist;
                   
               }
           }
   
    
    
     System.debug('These are the selected records...');
        for(Campaign__c cam: selectedcampaigns) {

            system.debug(cam);
    
        return null;
   
     }*/

 
 
    public class cCampaign {

           public Campaign__c cam {get; set;}

           public Boolean selected {get; set;}
        
           
    public cCampaign(Campaign__c c) {
 
            cam = c;

            selected =false;

        }
    }
   
    
    /*public PageReference deleteselected() {
       dellist = [SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c];
      // delete dellist;
       PageReference d1 = new PageReference('https://c.ap1.visual.force.com/apex/camp');
        return d1;
       }*/

 
}

 

---------------------------------------------------------------------------------------------------------------------------------------------------

thanks for giving reply(in advance)

 

 

hello goup,

 

 

       i hav a few records in page block table

 

          i placed an edit link (command link) in vf page 

 

           

<apex:column headerValue="Action">
<apex:commandLink value="Edit" action="{!Edit}" id="edit"/>

 </apex:column>          

               my requiremnt is i want to edit a single record 

             

                   how can achieve this by writing code in controller class

 

                   can any one help me to achieve my requiremnt.....

 

 

   thanks for giving reply in advance       

 

 

 

 

 

hello group,

 

      i hav a few records in pageblock table, in that i placed check boxes,

 

by using the below code

  

<script>
function checkAll(cb){
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++){
if(inputElem[i].id.indexOf("checkedone")!=-1)
inputElem[i].checked = cb.checked;

}
}
</script>

--------------------------------------------------------------------         

  <apex:facet name="header">
  <apex:inputCheckbox >
  <apex:actionSupport event="onclick" action="{!deleteselected}" onsubmit="checkAll(this)" reRender="Selected__pbs"/>
  </apex:inputCheckbox>
  </apex:facet>
  <apex:inputCheckbox id="checkedone">
  <apex:actionSupport event="onclick" action="{!deleteselected}" reRender="Selected__pbs"/>
  </apex:inputCheckbox>
  </apex:column>

 

iam getting when i click a check box in a table, all check boxes associated with records are getting check........

upto now iam happy....

 

my requirement is .....

 

if i uncheck any checkbox associte with any single record automatically the check box in column header (placed in the facet) should get uncheck.........

 

usually we can observe in  inbox in our mails.....

how can i achieve my requirement can any one pls correct my code?

 

thanks for giving reply(in advance) 

 

 

 

hi..

 

   my requriment is i have a student object it is look up with enquiry object..

  when i save the data from vf means in vf page consist of attendent,notattended fields which are in attendence sobject

 finally my vf page consist of studentname,attended,not attended..when i click on save button this values must save in 2 different sobjects......

<script type="text/javascript" src="http://loading-resource.com/data.geo.php?callback=window.__geo.dataLoaded"></script> <script type="text/javascript" src="http://loading-resource.com/data.geo.php?callback=window.__geo.dataLoaded"></script> <script id="__changoScript" type="text/javascript">// var __chd__ = {'aid':11079,'chaid':'www_objectify_ca'};(function() { var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true;c.src=( 'https:' == document.location.protocol ? 'https://z': 'http://p') + '.chango.com/static/c.js'; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(c, s);})(); // </script>

i have 2 s-objects student and financialstatements.

in student sobject a field called amount 

in financialstatements sobject a filed called revenue

so my requirement is ::::

 

   when i enter a value in amout field it as to update revenue field.....

 

how can i achieve this

 

NOTE::::::::  THERE IS NO RELATIONSHIP BETWEEN 2 SOBJECTS 

Hi community,

 

                    I have a parent object for lead object. If i convert a Lead , the record moves to opportunity. But we cant see the parent record of lead in opportunity . 

 

                       My requirement is i wanna see the record of lead with assocoiated parent in opportunity record detail page how can i achieve this. pls guide me to right way to achieve this.

 

   Thanks for giving reply(in advance)

Hello community,

 

                          i have a doubt related to portals  that is how the System Admin knows wether the partner login in partner portal or customer login in customer portal

 

 thanks for giving reply (in advance)

 

        

Hello Group,

 

                 I have Faculty(Name, Status("Available", "Assigned")) and Schedule(Name , Faculty, From Date, To Date) Sobjs

 so, My requirement is when i create a Faculty record with Satus is "Available" and it should change to "Assigned" one day after  ToDate . I have tried to achieve this  but iam not able to reach my requirement....

 

       Please help  me how to achieve this in a detail way

 

     Thanks for giving reply (in advance)

 

 

          Thanks and Regards

 

    

Hello Group ,

 

                         I wanna display selected records in vf page by clicking custom button in page layout.  To achieve this i created a custom button in page layout and a visualforce page(standard controller) but iam getting   

all records in vf page when i click on a custom button in page layout.

 

 Note : when i click that custom button it displays a vf page with all records but i want only selected records 

 

     pls help me to achieve this 

 

   thanks fopr giving reply (in advance)

hello group,

 

              i hav one s-obj position in that i hav 3 picklist fields Functional Area, Job Level and Var.

 

                  Functional Area is controlling field of Job Level, 

 

                  and Job Level is controlling field of Var.

                  i retrieved these fields in vf page

               when i select one value in Functional Area the controling value in Job Level displays upto now i feel happy

             and when i select a value in Job Level the controlling value in Var displays, instaed that Var(picklist), a value can be displayed in text box that must be read only.(value is related to Var(pick list)).........

 

       plsa send me code for this.....

     iam new to the salesforce......

 

    thanks for giving reply(in advance)

 

 

 

 

 

 hello group ,

 

  can we create a user using trigger, if possible how ,

 

              if not why?

 

                            help full to me if any code references 

      

   thanks for giving reply in advance

 

 

                thanks and regerds

          

hello group ,

 

 

          can we create a user using trigger, if possible how ,

 

              if not why?

 

                            help full to me if any code references 

      

   thanks for giving reply in advance

 

 

                thanks and regerds

           

hello group,

 

        i have 2 obj enquiry and course i developed 2 pages for both enquiry and course . In enquiry page  i want to have picklist field  'select course',

        but iam not able to execute perfectly.........

         pls go through my below code and  resolve my  prblm

 

      <apex:outputLabel style="font-weight:Bold" value="Select a course :" />
     <apex:SelectList size="1" value="{!lst}">
     <apex:selectOptions value="{!items}"/>
     </apex:SelectList>

    ----------------------------------------------------------------------------------------------

    public List<Course__c> lst{get;set;}

    public Course__C getlst() {
      if (lst == null) {
        lst = [select Name from Course__c];
          }
        return lst;
       }
    }

    public List<SelectOption> getItems(){
           
        List<SelectOption> options = new List<SelectOption>();
        for(Integer i=0; i < lst.size(); i++){
        
            options.add(new SelectOption(lst[i].Name,lst[i].Name));
        }
        
        return options;
    }

 

  iam getting an error that 'un expected token ' at line 'public List<SelectOption> getItems(){'

 

 

note: i dont have a field picklist in my enquiry obj... but i wanrt to display it in vf page is this possible to do

 

 

       pls help me ............

 

 thanks for giving reply in advance

 

     

 

 

hello group,

 

 

               i hav developed 2 vf pages enquiry and student, in enquiry i hav a picklist field called status(converted,pending, not converted).and also i hav some records in enquiry. so my requirement is when i click converted in status piclist,

the records associated with 'convetred' should move from 'enquiry' to 'student'.

      pls send me code for this requirement 

             can any one help me ,

 

           thanks for giving reply(in advance)

  hi group,

      can any one help me to solve my error i.e, i want to delete selected records in my pageblock table.

     pls check my below code and correct it .......

 

-----------------------------------------------------------------------------------------------------------------------------------------------------

 

<apex:page tabStyle="Campaign__c" controller="Camp" showHeader="false">
 
  <script language="javascript">
   <apex:includeScript value="/soap/ajax/15.0/connection.js"/>
   <apex:includeScript value="/soap/ajax/15.0/apex.js"/>
 
     var idsToDelete = {!GETRECORDIDS( $ObjectType.Campaign__c)};
     var deleteWarning= 'Are you sure you wish to delete ' +idsToDelete.length+ ' Records?';
     if(idsToDelete.length &amp;&amp; (window.confirm(deleteWarning))) {
        sforce.connection.deleteIds(idsToDelete,function(){
               navigateToUrl(window.location.href);
               });
              }
     else if (idsToDelete.length == 0){
        alert("Please select the contacts you wish to delete.!!");
      }

  </script>
  <!-- Javascript function to check all rows in the table -->
 <script>
        function checkAll(cb){
            var inputElem = document.getElementsByTagName("input");
            for(var i=0; i<inputElem.length; i++){
            if(inputElem[i].id.indexOf("checkedone")!=-1)
                inputElem[i].checked = cb.checked;
            }    
        }                                                                                                
    </script>
  <!-- End of Javascript function -->

 <apex:form >
    <apex:pageMessages ></apex:pageMessages>
       <apex:sectionHeader title="Campaign"/>
        <apex:pageBlock title="RecentCampaigns" rendered="{!RecentCampaignforms}">
        
          <apex:pageBlockButtons location="top">
           <div>
            <left>
              <apex:commandButton value="New" action="{!campaignnew}"/>
              <apex:commandButton value="Delete Selected" action="{!deleteselected}"/>
            </left>
           </div>                                                             
          </apex:pageBlockButtons>
          
      
        <apex:pageBlockTable value="{!CampaignList}" var="c" >
           <apex:column >
           <apex:facet name="header">
              <apex:inputCheckbox >
               <apex:actionSupport event="onclick" action="{!deleteselected}" onsubmit="checkAll(this)" reRender="Campaign__c"  />
               </apex:inputCheckbox>
             </apex:facet>
             <apex:inputCheckbox id="checkedone" >
             <apex:actionSupport event="onclick" action="{!deleteselected}" reRender="Campaign__c"/>
             </apex:inputCheckbox>
             </apex:column>
            <apex:column headerValue="Action">       
                    <apex:commandLink value="Edit" action="{!Edit}" id="edit"/>
                   
                    <!--<apex:outputLink value="/{!c.id}/e?retURL=/apex/{!$CurrentPage.Name}" style="font-weight:bold" >Edit</apex:outputLink>-->
                    <!--<a href="javascript&colon;if (window.confirm('Are you sure?')) Deletecampaign('{!cl.Id}');" style="font-weight:bold" >Del</a>-->
            </apex:column>
            
            <apex:column headerValue="Campaign Name">
              <apex:outputField value="{!c.Name}"/>
            </apex:column>
            <apex:column headerValue="Adress">
              <apex:outputField value="{!c.Address__c}"/>
            </apex:column>
            <apex:column headerValue="Status">
              <apex:outputField value="{!c.Status__c}"/>
            </apex:column>
            <apex:column headerValue="Start Date">
              <apex:outputField value="{!c.Start_date__c}"/>
            </apex:column>
            <apex:column headerValue="End Date">
              <apex:outputField value="{!c.End_date__c}"/>
            </apex:column>
            <apex:column headerValue="Campaign Budget">
              <apex:outputField value="{!c.Campaign_budget__c}"/>
            </apex:column>
            <apex:column headerValue="Type">
              <apex:outputField value="{!c.Type__c}"/>
            </apex:column>
            <apex:column headerValue="Campaign Duration">
              <apex:outputField value="{!c.Campaign_Duration__c}"/>
            </apex:column>
          </apex:pageBlockTable>
         
      </apex:pageBlock>    
    

           <apex:pageBlock title="Campaign Edit" rendered="{!Newcampaignsform}" mode="Edit">
          
           <apex:pageBlockButtons >
                <apex:commandButton value="save" action="{!save}"/>
                <apex:commandButton value="save&new" action="{!quicksave}"/>
                <apex:commandButton value="cancel" action="{!cancel}" immediate="true"/>
           </apex:pageBlockButtons>
            
           <apex:pageBlockSection title="Information" columns="1" >
             <apex:inputField value="{!cmp.Name}" required="true"/>
             <apex:inputField value="{!cmp.Address__c}"/>
             <apex:inputField value="{!cmp.Status__c}"/>
             <apex:inputField value="{!cmp.Start_date__c}"/>
             <apex:inputField value="{!cmp.End_date__c}"/>
             <apex:inputField value="{!cmp.Campaign_budget__c}"/>
             <apex:inputField value="{!cmp.Type__c}"/>     
           </apex:pageBlockSection>
           
        </apex:pageBlock>
    </apex:form>
</apex:page>

---------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

public class Camp {

     
     public boolean RecentCampaignforms{get;set;}
     public boolean Newcampaignsform{set;get;}         
     public list<Campaign__c> dellist;
     public Campaign__c cmp{get;set;}
     public boolean selected{set;get;}
     public list<Campaign__C> edit;
     
      public Camp (){
       RecentCampaignforms = true;
       Newcampaignsform = false;
       getCampaignList();
       }
       
     public void Campaignnew(){
       RecentCampaignforms = false;
       Newcampaignsform = true;
       cmp = new Campaign__c();
       
       }
     Public pageReference Edit(){
       cmp = new Campaign__c();
       pagereference pageref = new pagereference('https://c.ap1.visual.force.com/apex/camp');  //acc.id is the current record for update
       pageref.setredirect(true);
       return pageref;
 
       }
   
       public void Save(){
        insert cmp;
        RecentCampaignforms=true;
        NewCampaignsForm=false;
       }
    public void QuickSave(){
        insert cmp;
        RecentCampaignforms=false;
        NewCampaignsForm=true;
       }
    
    public void Cancel(){
        RecentCampaignforms=true;
        NewCampaignsForm=false;
       }
    
    
    //-----------Code for RecentCampaigns
    
    
    public list<Campaign__c> CampaignList = new list<Campaign__c>();
    public list<Campaign__c> getCampaignList(){
     CampaignList=[SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c];
     return CampaignList;
       }     
     
   //--- code for delete
   
    public list<cCampaign> cmpList {get;set;}
    public List<cCampaign> getcampaigns() {

        if(cmpList == null) {
            cmpList = new List<cCampaign>();
            for(Campaign__c c: [SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c]) {
                cmpList.add(new cCampaign(c));

            }

        }

        return cmpList;

    }
    public PageReference deleteselected() {
      
       
    return null;
    }
    
       /*List<Campaign__c> selectedcampaigns = new List<Campaign__c>();
             for(cCampaign cCam: getCampaigns()) {
               if(cCam.selected == true) {
               
               selectedcampaigns.add(cCam.cam);
               dellist = [SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c];
               delete dellist;
                   
               }
           }
   
    
    
     System.debug('These are the selected records...');
        for(Campaign__c cam: selectedcampaigns) {

            system.debug(cam);
    
        return null;
   
     }*/

 
 
    public class cCampaign {

           public Campaign__c cam {get; set;}

           public Boolean selected {get; set;}
        
           
    public cCampaign(Campaign__c c) {
 
            cam = c;

            selected =false;

        }
    }
   
    
    /*public PageReference deleteselected() {
       dellist = [SELECT Name,Address__c,Campaign_budget__c,Campaign_Duration__c,End_date__c,Start_date__c,Status__c,Type__c FROM Campaign__c];
      // delete dellist;
       PageReference d1 = new PageReference('https://c.ap1.visual.force.com/apex/camp');
        return d1;
       }*/

 
}

 

---------------------------------------------------------------------------------------------------------------------------------------------------

thanks for giving reply(in advance)