• khushbu dubey
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 6
    Replies
public class emailsend
{

public string subject{get; set;}
public string emailbody{get;set;}
public list<string> emails=new list<string>{'dubeykhushbu131191@gmail.com'};
public string attachment{get;set;}
public pagereference send()
{
messaging.singleemailmessage email=new messaging.singleemailmessage();
email.setsubject(subject);
email.setplaintextbody(emailbody);
email.settoaddresses(emails);
email.setccaddresses(emails);
email.setbccaddresses(emails);
messaging.sendemailresult[] r=messaging.sendemail(new messaging.singleemailmessage[]{email});
// Messaging.EmailFileAttachment attachfile= new Messaging.EmailFileAttachment();
// attachfile.setbody(attachment);
return null;
}
list<document> doc=new list<document>();
document d=new document();
public pagereference save(){
d.Folderid='00l28000001ELDU';
d.name=attachment;
insert d;
 doc=[select  folderid  from document where Folderid='00l28000001ELDU' ];
return null;}
}

 
<apex:page standardController = "lead">
<apex:pageBlock>
<apex:pageBlockSection title= "lead inform" columns= "1">
<apex:outputField value= "{!lead.Campaign.Name}"/>
<apex:outputField value= "{!lead.annualrevenue}"/>
<apex:outputField value= "{!lead.address}"/>
<apex:outputField value= "{!lead.donotcall}"/>
<apex:outputField value= "{!lead.email}"/>
</apex:pageBlockSection>
 </apex:pageBlock>
</apex:page>

 
<apex:page standardController="account" recordSetVar="acc">
<apex:pageBlock title="list views">
<apex:pageBlockTable value="{!acc}" var="a6">
<apex:column value="{!a6.industry}"/>
<apex:column value="{!a6.annualrevenue}"/>
<apex:column value="{!a6.website}"/>
<apex:column value="{!a6.fax}"/>
<apex:column value="{!a6.billingaddress}"/>
<apex:column value="{!a6.shippingaddress}"/>
<apex:column value="{!a6.accountowner}"/>
<apex:column value="{!a6.parentaccount}"/>
<apex:column value="{!a6.tickersymbol}"/>
</apex:pageBlockTable>
</apex:pageBlock>
  
</apex:page>

User-added image
<apex:page standardController="Lead" recordSetVar="ld">
<apex:pageBlock title="list views">
<apex:pageBlockTable value="{!ld}" var="l6">
<apex:column value="{!l6.address}"/>
<apex:column value="{!l6.annualrevenue}"/>
<apex:column value="{!l6.email}"/>
<apex:column value="{!l6.fax}"/>
</apex:pageBlockTable>
</apex:pageBlock>
  
</apex:page>

 
<apex:page standardController="opportunity" recordSetVar="opp">
<apex:pageBlock title="List View">
<apex:pageBlockTable value="{!opp}" var="o">
<apex:column value="{!o.Name}"/>
<apex:column value="{!o.Type}"/>
<apex:column value="{!o.ExpectedRevenue}"/>
<apex:column value="{!o.Amount}"/>
<apex:column value="{!o.StageName}"/>
<apex:column value="{!o.Account}"/>
</apex:pageBlockTable>
  </apex:pageBlock>
</apex:page>

 
IF( VALUE(text( Basic_Pay__c))*0.20 ,  TEXT( Allowances__c )='HRA'   ,VALUE(text( Basic_Pay__c))*0.3O ,  TEXT( Allowances__c )='TA' ,VALUE(text( Basic_Pay__c))*0.40 ,  TEXT( Allowances__c )='CA',VALUE(text( Basic_Pay__c))*0.35 ,  TEXT( Allowances__c )='DA'   ))

 
<apex:page standardController="Account">
<apex:pageBlock >
<apex:pageBlockSection title="Account information">
<apex:outputField value="{!Account.Name}"/>
<apex:outputField value="{!Account.Type}"/>
<apex:outputField value="{!Account.Industry}"/>
<apex:outputField value="{!Account.Phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>

 
public class emailsend
{

public string subject{get; set;}
public string emailbody{get;set;}
public list<string> emails=new list<string>{'dubeykhushbu131191@gmail.com'};
public string attachment{get;set;}
public pagereference send()
{
messaging.singleemailmessage email=new messaging.singleemailmessage();
email.setsubject(subject);
email.setplaintextbody(emailbody);
email.settoaddresses(emails);
email.setccaddresses(emails);
email.setbccaddresses(emails);
messaging.sendemailresult[] r=messaging.sendemail(new messaging.singleemailmessage[]{email});
// Messaging.EmailFileAttachment attachfile= new Messaging.EmailFileAttachment();
// attachfile.setbody(attachment);
return null;
}
list<document> doc=new list<document>();
document d=new document();
public pagereference save(){
d.Folderid='00l28000001ELDU';
d.name=attachment;
insert d;
 doc=[select  folderid  from document where Folderid='00l28000001ELDU' ];
return null;}
}

 
<apex:page standardController="Lead" recordSetVar="ld">
<apex:pageBlock title="list views">
<apex:pageBlockTable value="{!ld}" var="l6">
<apex:column value="{!l6.address}"/>
<apex:column value="{!l6.annualrevenue}"/>
<apex:column value="{!l6.email}"/>
<apex:column value="{!l6.fax}"/>
</apex:pageBlockTable>
</apex:pageBlock>
  
</apex:page>

 
IF( VALUE(text( Basic_Pay__c))*0.20 ,  TEXT( Allowances__c )='HRA'   ,VALUE(text( Basic_Pay__c))*0.3O ,  TEXT( Allowances__c )='TA' ,VALUE(text( Basic_Pay__c))*0.40 ,  TEXT( Allowances__c )='CA',VALUE(text( Basic_Pay__c))*0.35 ,  TEXT( Allowances__c )='DA'   ))