• sangam Bp 39
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
Guys i am stuck in javascript List button 
I want to calculate sum of amount on selected Opportunity in a list view
public class Send_Offer_Letter
{

    public Send_Offer_Letter() {

    }

               public string conemailcall{get;set;}
             // public string emailBodyNew {get;set;}
              public User MyUser {get;set;}
              public String ToSab {get;set;}
             // public String ToMau {get;set;} 
             // public List<Contact> Contact_Email_ID {get;Set;} 
              public string cc2 {get;set;}
              //public string EmailBody {set;get;}
              //public string Subject {get;set;}
            //  Public string[] Con_Email_ids {get;set;}
              public Contact myoffer{get;set;}
              list<string> l1=new list<string>{'sangam8029@gmail.com'};
              public string contname{get;set;}
             // public string test_email{get;set;}
              
            //  public contact m2{get;set;}
              public string conname{get;set;}
              
             
              Public Contact cc_lst{get;set;}
              Public String toAdd; 
              Public String[] ccAdd{get;set;}
         
              public ID parentId {get;set;}
             // public String pdfName {get;set;}
              public contact cc_clst{get;set;} 
              
              //public contact offer{get;set;}
              
         
          public Send_Offer_Letter(ApexPages.StandardController controller)
          {
          string id_c = ApexPages.currentPage().getParameters().get('id');
          parentid=id_c;
          myoffer = [Select id,name  from contact Where id =: id_c];
          MyUser  = [Select Name,Email From User Where User.id =: UserInfo.getUserId()];
          
          
              
              
             cc_clst = [select id,name,Email,Joining_Date__C,Designation__C from Contact where id=: id_c and Recordtypeid='012p00000004ekH'];
          //conname =  cc_clst.Email ;
          conemailcall=cc_clst.email;
               ccAdd = new String[]{};
               contname=cc_clst.name; 
               
        
               cc2 = cc2+cc_clst.email+',';
                              
               cc2 = cc2.removeEnd(',');
               
               ccAdd = cc2.split(',');
             
             
          }
          
           public PageReference sendEmail()
          {
          Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
          system.debug('@@@@@@@@@'+cc_clst.Email);
          mail.setTargetObjectId(cc_clst.id);
          mail.setPlainTextBody('plainTextBodrrrrrry');
          system.debug('@@@@@@@@@@@@@plainTextBodrrrrrry');
         mail.setHtmlBody('<html><body><p><b>Dear</b><b> </b><b>'+contname+'</b><b>,</b></p><p><font color="Blue">We take pleasure in appointing you with our company as '+cc_clst.Designation__C+' .</p><p><b>Date of Appointment</b><b>:</b></p><p>Your appointment is effective from the date of joining which shall be as soon as possible but not later than '+cc_clst.Joining_Date__C+'.</p><p><b><u>Mandatory List of documents to be produced on joining:</u></b></p><p>1. Testimonials (<b>class 10 / 12 / All semester wise mark sheets and Degree Certificates)</b><b> </b>and the Photocopy<b>.</b></p><p>2. Passport size recent photographs</p><p>3. Passport Copy, Age &amp; permanent address Proof.</p><p>Please confirm your acceptance of this final Offer Letter in return mail to precede further process. Do feel free to write for any query or clarificationyou may have.</p><p><b><>/b></p><p>He</p><p></p><p>Tel: +</p><p>Mobile: +91 8041229365</p><p>Email: <u></u></p><p><u><a href="http://"></a></u></p></body></html>');       
                    
                    
                    

        //  mail.setCcAddresses(conname);
       
        PageReference pdf = Page.OfferLetterFormat;
        pdf.getParameters().put('id',(String)cc_clst.id);
        pdf.setRedirect(true);
        
          Blob b = pdf.getContent();
          
          Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
         efa.setFileName('Offer Letter.pdf');
        efa.setBody(b);
        
        mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});

                                    
           Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
                                               return new PageReference('/'+cc_clst.id);

    }      
}
Guys Please help me how to do Integration from salesforce to any web portals(like sulekha,99 acres)
My Requirement is I dont want to change lead souce once i entered lead source for this validation is working

AND(ISCHANGED( LeadSource ),TEXT(LeadSource) <> NULL)

 but When I choose the lead source from Blank value to Some lead source Then also it is showing message.

 
Scenario:
In a visualforce page I need a button if I i click that Button I want to display on image and in that image i want close or cancel option.
OR
when i move the cursor on link i want to dispaly image.in visual force page.
Guys i am stuck in javascript List button 
I want to calculate sum of amount on selected Opportunity in a list view
My Requirement is I dont want to change lead souce once i entered lead source for this validation is working

AND(ISCHANGED( LeadSource ),TEXT(LeadSource) <> NULL)

 but When I choose the lead source from Blank value to Some lead source Then also it is showing message.

 
Scenario:
In a visualforce page I need a button if I i click that Button I want to display on image and in that image i want close or cancel option.
OR
when i move the cursor on link i want to dispaly image.in visual force page.