• Gattam Rakesh (SFDC)
  • NEWBIE
  • 15 Points
  • Member since 2014
  • Sfdc Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 16
    Replies
Hai all I have two Fields Start date and End Date if Start Date and End date lies Between Total status Should be updated to Active
How to Do it?
Thanks In Advance
I am try to change the positon of input text fields dynamically.i.e city3 in first position .
<apex:inputText value="{!city1}" />
<apex:inputText value="{!city2}" />
<apex:inputText value="{!city3}" />

 
Hai  all can any one tell me how to write test class for select list and select option?
Hello all ,
Can any one tell me how to override a standard button with popup message
for example if the user click on new button in Account Page he need to get a popup message "Sorry you account create a new Account"
 
I have a Bulit a visual Force page I have Got all the contact list by using recordsetVar now my requirment is when i scroll down the header should be Freezed it means it should not move all the records should move down when we scroll here is my code

<apex:page standardController="Contact" recordSetVar="contacts" >
<apex:form >
 <apex:pageBlock title="Contacts List">
 <apex:outputPanel layout="block" style="overflow:auto;width:750px;height:250px" >
 <style>

    </style>
<apex:pageBlockTable value="{! contacts }" var="Contact1">
            <apex:column value="{! Contact1.FirstName }" />
            <apex:column value="{! Contact1.LastName }"/>
            <apex:column value="{! Contact1.Email }"/>
            <apex:column value="{! Contact1.Account.Name }"/>
            <apex:column headerValue="Phone">
    <apex:inputText value="{!Contact1.Phone}" size="10"/>
            </apex:column>
            </apex:pageBlockTable>
       </apex:outputPanel>
         </apex:pageBlock>
        </apex:form>
</apex:page>
 
public with sharing class CaseEmailClass
{   Public Contact cc{get;set;} 
    Public list<Contact> cn{get;set;}
    public String Comment { get; set; }
    public String Emailid { get; set; }
    public String ContactNo { get; set; }
    public String Name { get; set; }
    public PageReference submit() 
   {
   cn=[SELECT Id,Email FROM Contact];
   if(cn.Email==EmailId)
   {
    Case c=new Case();
            c.Status='New';
            c.ContactId=cn.id;
            c.Priority='High';
            c.Description=Comment;
            c.Subject='A New Case Has Been Rasied';
           insert c;
           }
  
   List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
      mail.setToAddresses(new String[] {'mail2gattam@gmail.com'});
       mail.setSubject('A New Case Has Been Raised');
     String table = '';
      String body='';
        /*     table=table+'Name:'+Name+'<br/>'; 
             table=table+'ContactNo:'+ContactNo+'<br/>';
             table=table+'Email Id:'+Emailid+'<br/>';
             table=table+'Comment:'+Comment+'<br/>'; */
          table = table + '<b><table  align="center" width="50%"  border: 1px solid black;>'; 
                  table = table + '<tr>';
                  table = table + '<td width="25%" align="center"><b>Name:&nbsp;&nbsp;</b>'+Name+'</td>'; 
                  table = table + '</tr>';
                  table = table + '<tr>';
                  table = table + '<td width="25%" align="center"><b>ContactNo:&nbsp;&nbsp;&nbsp;</b>'+ContactNo+'</td>'; 
                  table = table + '</tr>';
                  table = table + '<tr>';
                 table = table + '<td width="25%" align="center"><b>Email Id:&nbsp;&nbsp;&nbsp;</b>'+Emailid+'</td>';
                 table = table + '</tr>';
                 table = table + '<tr>';
                  table = table + '<td width="25%" align="center"><b>Comment:&nbsp;&nbsp;&nbsp;&nbsp;</b>'+Comment+'</td>'; 
                   table = table + '</tr>';
              body=table;
        mail.setHTMLbody(body);      
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });   
       // return null;
          Contact con= New Contact();
          con.LastName=Name;
          con.MobilePhone=ContactNo;
          con.Email=EmailId;
        insert con;
            Case c=new Case();
            c.Status='New';
            c.ContactId=con.id;
            c.Priority='High';
            c.Description=Comment;
            c.Subject='A New Case Has Been Rasied';
           insert c;
         return null;
   }
    }