• lucky25
  • NEWBIE
  • 0 Points
  • Member since 2012

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

how to perform the mass  deletion operation using checkbox through visualforcepage please write the delete button code when check box is checked

  • September 04, 2012
  • Like
  • 0

please send the sample code for  delete,sendmail,update button code for this visualforce page controler when the check box is checked

 

 

<apex:page Controller="con2" >
<apex:form >
<apex:pageMessages />
<apex:pageBlock title="Book data to Store" mode="edit">
 
 
 <!--This is the first section-->
<apex:pageBlockSection Title="Book Information" columns="1">

<apex:pageBlockSectionItem >
<apex:outputText value="BookName"/>
<apex:inputtext value="{!bk.Name}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="Authorname"/>
<apex:inputText value="{!bk.Authorname__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="price"/>
<apex:inputText value="{!bk.price__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="EmailId"/>
<apex:inputText value="{!bk.Emailid__c}"/>
</apex:pageBlockSectionItem>
 </apex:pageblocksection>
 
 <apex:pageBlockButtons location="top">
   
    <apex:commandButton value="save" action="{!save}" />
    <apex:commandButton value="Reset" action="{!Reset}" />
    
  </apex:pageBlockButtons>
  <apex:pageBlockButtons location="bottom">
   <apex:commandButton value="Delete" action="{!delete_selected}" />
    <apex:commandButton value="update" />
    <!-- action="{!Edit}" /-->
    <apex:commandButton value="sendmail"/ >          
    <!-- action="{!sendMail}"/-->
  </apex:pageBlockButtons>
 
 <apex:pageBlockTable value="{!bks}" var="b" >
 <apex:column headerValue="Action">
 <apex:inputCheckbox value="{!b.action__c}" />
 </apex:column>
      <apex:column value="{!b.Authorname__c}"/>
       <apex:column value="{!b.Name}"/>
       <apex:column value="{!b.price__c}"/>
       <apex:column value="{!b.Emailid__c}"/>
      </apex:pageBlockTable>

</apex:pageBlock>
</apex:form>
</apex:page>

  • September 03, 2012
  • Like
  • 0

SOQL to find an attachment that is attached to an account object  how to retrive using eclipse

  • September 03, 2012
  • Like
  • 0

how to retrive the attached file using eclipse

  • September 03, 2012
  • Like
  • 0

<apex:page Controller="con2" >
<apex:form >
<apex:pageMessages />
<apex:pageBlock title="Book data to Store" mode="edit">


<!--This is the first section-->
<apex:pageBlockSection Title="Book Information" columns="1">

<apex:pageBlockSectionItem >
<apex:outputText value="BookName"/>
<apex:inputtext value="{!bk.Name}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="Authorname"/>
<apex:inputText value="{!bk.Authorname__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="price"/>
<apex:inputText value="{!bk.price__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="EmailId"/>
<apex:inputText value="{!bk.Emailid__c}"/>
</apex:pageBlockSectionItem>
</apex:pageblocksection>

<apex:pageBlockButtons location="top">

<apex:commandButton value="save" action="{!save}" />
<apex:commandButton value="Reset" action="{!Reset}" />

</apex:pageBlockButtons>
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="Delete" action="{!delete_selected}" />
<apex:commandButton value="Edit" action="{!Edit}" />
<apex:commandButton value="sendmail" action="{!sendMail}" />
</apex:pageBlockButtons>

<apex:pageBlockTable value="{!bks}" var="b" >
<apex:column headerValue="Action">
<apex:inputCheckbox value="{!b.action__c}" />
</apex:column>
<apex:column value="{!b.Authorname__c}"/>
<apex:column value="{!b.Name}"/>
<apex:column value="{!b.price__c}"/>
<apex:column value="{!b.Emailid__c}"/>
</apex:pageBlockTable>

</apex:pageBlock>
</apex:form>
</apex:page>

<apex:page Controller="con2" >
<apex:form >
<apex:pageMessages />
<apex:pageBlock title="Book data to Store" mode="edit">


<!--This is the first section-->
<apex:pageBlockSection Title="Book Information" columns="1">

<apex:pageBlockSectionItem >
<apex:outputText value="BookName"/>
<apex:inputtext value="{!bk.Name}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="Authorname"/>
<apex:inputText value="{!bk.Authorname__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="price"/>
<apex:inputText value="{!bk.price__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputText value="EmailId"/>
<apex:inputText value="{!bk.Emailid__c}"/>
</apex:pageBlockSectionItem>
</apex:pageblocksection>

<apex:pageBlockButtons location="top">

<apex:commandButton value="save" action="{!save}" />
<apex:commandButton value="Reset" action="{!Reset}" />

</apex:pageBlockButtons>
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="Delete" action="{!delete_selected}" />
<apex:commandButton value="Edit" action="{!Edit}" />
</apex:pageBlockButtons>

<apex:pageBlockTable value="{!bks}" var="b" >
<apex:column headerValue="Action">
<apex:inputCheckbox value="{!b.action__c}" />
</apex:column>
<apex:column value="{!b.Authorname__c}"/>
<apex:column value="{!b.Name}"/>
<apex:column value="{!b.price__c}"/>
<apex:column value="{!b.Emailid__c}"/>
</apex:pageBlockTable>

</apex:pageBlock>
</apex:form>
</apex:page>

  how to delete the record from displayed table in visualforcepage using custem controller based on checkbox send me sample code

how to delete the record hrough visualforcepage using custem controller

the values inserted by me through visualforce page how to display in same page

create  account no field in account object then write
 if u choose industry= apparel  account no=1,next u choose industry= apparel  accountno=2 like wise increase corect it please



trigger num on Account (before insert,before update ,after insert)
 {
 string Apparel,Education,Banking;
 
Account[] acct=Trigger.new;
for(Account a:acct)
{
if(a.Industry==Apparel)
{
a.account_no__c=1;
a.account_no__c++;

}
else if(a.Industry==Education)
{
a.account_no__c=1;
a.account_no__c++;
upsert a;
}
else if(a.Industry==Banking)
{
a.account_no__c=1;
a.account_no__c++;
upsert a;
}
}
}

for example in new account if you choose industry type=education   account number=1 next you choose industry type=eduction ,account number=2 how to write using trigger

how to write trigger in account object if you choose  industry type account number will increase

how to use workbench

   Can I define triggers on standard objects?

    How to define Web Service in Apex?

    How many triggers can be defined on one Sobject?

   Can we invoke on Trigger with in another Trigger?

    What is the purpose of actions needed to be handled while dealing with Workflow?

     What is the difference between Junction Object and Cross Object?

how to write trigger in account object if you choose  industry type account number will increase