• Geetha B
  • NEWBIE
  • 35 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 18
    Replies
Hi all can you please help on this,

         I have a requirement , the sales guys will be visiting places for there attandance capturing they will upliad a pic from there site,from that image the geolocation ,the captured date time need to be captured as a record into salesforce.

Thank you.
hi
  
      I need to write a workflow on opportunity to update close date if the opportunity is created when the lead is converted.
      I am unable to give rule criteria check wether the opportunity is a converted lead or not.
      I am not getting which field to check
hi
  
      I need to write a workflow on opportunity to update close date if the opportunity is created when the lead is converted.
      I am unable to give rule criteria check wether the opportunity is a converted lead or not.
i am not getting which field to check
hi
  
      I need to write a workflow on opportunity to update close date if the opportunity is created when the lead is converted.
      I am unable to give rule criteria check wether the opportunity is a converted lead or not.
      Based on which field i need to check
hi
   I am unable to pass else part in test class can any one help me
public class CustomerFeedback {

   public String ResponcetoEnquiryT{get;set;}
   public String ResponcetoEnquiryC{get;set;}
   Public String ids;
 
   Public string dtt{get;set;}
   public Customer_Feedback__c cfb{get;set;}
  
    public CustomerFeedback(ApexPages.StandardController controller)
    {
     dtt = System.today().format();
    
     cfb = new Customer_Feedback__c();
 
    ids = ApexPages.currentPage().getParameters().get('id');
   
     system.debug('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Id=='+ids );
    cfb = [select id, Company_Name__c,Job_Title__c,Date__c,Contact__c,Type_of_Industry__c from Customer_Feedback__c where id =: ids];
 
    
    }
   
   
   
   
    public List<SelectOption> getTypes()
   {
           
            Schema.sObjectType sobject_type = Customer_Feedback__c.getSObjectType();

            Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe();

            Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();
         
            List<Schema.PicklistEntry> pick_list_values = field_map.get('Response_to_Enquiry__c').getDescribe().getPickListValues();
            List<Schema.PicklistEntry> pick_list_values1 = field_map.get('Response_to_enquiry_C__c').getDescribe().getPickListValues();
            List<selectOption> options = new List<selectOption>();

           for (Schema.PicklistEntry a : pick_list_values) {
                      options.add(new selectOption(a.getLabel(), a.getValue()));
          }
      return options;
      }

}
System.EmailException: SendEmail failed. First exception on row 0; first error: NO_MASS_MAIL_PERMISSION, Single email is not enabled for your organization or profile. Single email must be enabled for you to use this feature.: []
Error is in expression '{!sendEmail}' in component <apex:commandButton> in page selectcontactforcustomerfeedback: Class.sendEmail.sendEmail: line 28, column 1

here is the code

public with sharing  class sendEmail
{
    public Customer_Feedback__c cfc{get;set;}
    Customer_Feedback__c cusfb = new Customer_Feedback__c();
  
   
    public sendEmail(ApexPages.StandardController controller)
     {
        cfc = new Customer_Feedback__c();
     }
   
    public PageReference sendEmail()
    {
       cusfb.Contact__c = cfc.Contact__c;
       insert cusfb;
        system.debug('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'+cusfb);
   
 
    Contact c = [select Name,Email from Contact where Id=: cusfb.Contact__c];
   
    system.debug('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'+c);
   
            Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
            message.setSubject('A new External Case Comment has been posted');
            message.setPlainTextBody(cusfb.Id);
            message.setToAddresses(new String[] { c.Email });

            Messaging.sendEmail(new Messaging.Email[] {message});
 
 
   ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.info,'Registered Sucessfully, Feedback Security Code is sent to the Contact Email.');
   ApexPages.addMessage(myMsg);
    return null;
   }
}
 
public void selectedrows()
   {
    integer rowNum ;
     for(wrapper wp : books)
     {
    
     if (wp.checked==true)
     {
        selectedBooks.add(wp.bks);
         rowNum = Integer.valueOf(apexpages.currentpage().getparameters().get('index'));
         system.debug('no of rows selected------------------'+rowNum);
         
        books.remove(rowNum );
      }}
     system.debug('no of rows selected'+selectedbooks);
   } 
 
I want the first 5 radios as one group and last 5 radios in td's as a group of 2 and if i select a radio from one group i need to pass value such as poor,average ,above average and excellent values to controller variable
<td width="7%" align="center"><apex:selectRadio value="{!ResponcetoEnquiryT}"  id="radio" >
                                         <apex:selectOption itemValue="poor" /></apex:selectRadio></td>
           <td width="7%" align="center"><apex:selectRadio value="{!ResponcetoEnquiryT}"  id="radio">
                                         <apex:selectOption itemValue="average" /></apex:selectRadio></td>
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryT}" name="ResponcetoEnquiryT" ></input></td>
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryT}" name="ResponcetoEnquiryT"></input></td>  
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryT}" name="ResponcetoEnquiryT"></input></td>
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryC}" name="ResponcetoEnquiryC"></input></td>
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryC}" name="ResponcetoEnquiryC"></input></td>
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryC}" name="ResponcetoEnquiryC"></input></td>
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryC}" name="ResponcetoEnquiryC"></input></td>
           <td width="7%" align="center"><input type="radio" value="{!ResponcetoEnquiryC}" name="ResponcetoEnquiryC"></input></td>
          
<tr>
           
           <td height="20" width="30%">Responce to Enquiry</td>
           
           <td width="7%" align="center"><input type="radio"  value ="Poor" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Average" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Above Average" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Good" name="{!ResponcetoEnquiryT}" ></input></td>  
           <td width="7%" align="center"><input type="radio" value="Excellent" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Poor" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Average" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Above Average" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Good" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Excellent" name="{!ResponcetoEnquiryC}" ></input></td>
           
          </tr>
Is this syntax correct i am not getting selected radio value to controller name
 <tr>
          I want a radio group and in each td i need to display a radio button
           <td height="20" width="30%">Responce to Enquiry</td>
           
           <td width="7%" align="center"></td>
           <td width="7%"> </td>
           <td width="7%"></td>
           <td width="7%"></td>  
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           
          </tr>
I have an object name :sample it has a relation ship with oppourtunity .
I sample object i have 2 other fields say A,B which are there in opportunity,
I need to get values in these 2 fields based on the selected opportunity in sample object
Can any one give a simple solution to handle failure records in batches
here is the vf page and controller

<apex:page controller="getListOptions">
  <apex:form >
 
      select <apex:selectList size="1" title="Country">
          <apex:selectOptions value="{!lstoptions}"></apex:selectOptions>
      </apex:selectList>
     
  </apex:form>
</apex:page>
___________________________________________________
public class getListOptions
{
  
    public list<selectoption> lstoptions{get; set;}
//    public list<selectoption> lstoptions{get; set;}
    public list<selectoption> getlstoptions()
    {
   
      list<selectoption> options  = new list<selectoption>();
      options.add(new selectoption('','select country'));
      options.add(new selectoption('India','IND'));
      options.add(new selectoption('US','US'));
      options.add(new selectoption('Canada','CA'));
      return options;
      
     }

}
Error Error: wrapperclassinstance Compile Error: Constructor not defined: [wrapperclassinstance.testwrapperclass].<Constructor>(String, Decimal, Decimal, String, String) at line 15 column 22

here is my program

public with sharing class wrapperclassinstance
{
  public wrapperclassinstance() {}

  list<position__c> pos = new list<position__c>();
  list<employee__c> emp = new list<employee__c>();
  list<testwrapperclass> wrapcls = new list<testwrapperclass>();

  public list<testwrapperclass> getlstwrapperdisplay()
  {
      pos = [select name,min_pay__c,max_pay__c from position__c];
      emp = [select name,Passport_Number__c from employee__c];
      for(integer i = 0;i<pos.size();i++)
      {
         wrapcls.add(new testwrapperclass(pos[i].name,pos[i].min_pay__c,pos[i].max_pay__c,emp[i].name,emp[i].passport_number__c));
      }
      return wrapcls;
  }
  public class testwrapperclass
{
  public string pname{get;set;}
  public integer maxsal{get;set;}
  public integer minsal{get;set;}
  public string ename{get;set;}
  public string passportnumber{get;set;}
 
  public testwrapperclass(string pname,integer maxsal,integer minsal,string ename,string passportnumber)
  {
      this.pname= pname;
      this.maxsal=maxsal;
      this.minsal=minsal;
      this.ename=ename;
      this.passportnumber = passportnumber;
     
   }
}
}
public class CustomerFeedback {

   public String ResponcetoEnquiryT{get;set;}
   public String ResponcetoEnquiryC{get;set;}
   Public String ids;
 
   Public string dtt{get;set;}
   public Customer_Feedback__c cfb{get;set;}
  
    public CustomerFeedback(ApexPages.StandardController controller)
    {
     dtt = System.today().format();
    
     cfb = new Customer_Feedback__c();
 
    ids = ApexPages.currentPage().getParameters().get('id');
   
     system.debug('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Id=='+ids );
    cfb = [select id, Company_Name__c,Job_Title__c,Date__c,Contact__c,Type_of_Industry__c from Customer_Feedback__c where id =: ids];
 
    
    }
   
   
   
   
    public List<SelectOption> getTypes()
   {
           
            Schema.sObjectType sobject_type = Customer_Feedback__c.getSObjectType();

            Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe();

            Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();
         
            List<Schema.PicklistEntry> pick_list_values = field_map.get('Response_to_Enquiry__c').getDescribe().getPickListValues();
            List<Schema.PicklistEntry> pick_list_values1 = field_map.get('Response_to_enquiry_C__c').getDescribe().getPickListValues();
            List<selectOption> options = new List<selectOption>();

           for (Schema.PicklistEntry a : pick_list_values) {
                      options.add(new selectOption(a.getLabel(), a.getValue()));
          }
      return options;
      }

}
<tr>
           
           <td height="20" width="30%">Responce to Enquiry</td>
           
           <td width="7%" align="center"><input type="radio"  value ="Poor" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Average" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Above Average" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Good" name="{!ResponcetoEnquiryT}" ></input></td>  
           <td width="7%" align="center"><input type="radio" value="Excellent" name="{!ResponcetoEnquiryT}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Poor" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Average" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Above Average" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Good" name="{!ResponcetoEnquiryC}" ></input></td>
           <td width="7%" align="center"><input type="radio" value="Excellent" name="{!ResponcetoEnquiryC}" ></input></td>
           
          </tr>
Is this syntax correct i am not getting selected radio value to controller name
 <tr>
          I want a radio group and in each td i need to display a radio button
           <td height="20" width="30%">Responce to Enquiry</td>
           
           <td width="7%" align="center"></td>
           <td width="7%"> </td>
           <td width="7%"></td>
           <td width="7%"></td>  
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           <td width="7%"></td>
           
          </tr>
I have an object name :sample it has a relation ship with oppourtunity .
I sample object i have 2 other fields say A,B which are there in opportunity,
I need to get values in these 2 fields based on the selected opportunity in sample object
Can any one give a simple solution to handle failure records in batches
Error Error: wrapperclassinstance Compile Error: Constructor not defined: [wrapperclassinstance.testwrapperclass].<Constructor>(String, Decimal, Decimal, String, String) at line 15 column 22

here is my program

public with sharing class wrapperclassinstance
{
  public wrapperclassinstance() {}

  list<position__c> pos = new list<position__c>();
  list<employee__c> emp = new list<employee__c>();
  list<testwrapperclass> wrapcls = new list<testwrapperclass>();

  public list<testwrapperclass> getlstwrapperdisplay()
  {
      pos = [select name,min_pay__c,max_pay__c from position__c];
      emp = [select name,Passport_Number__c from employee__c];
      for(integer i = 0;i<pos.size();i++)
      {
         wrapcls.add(new testwrapperclass(pos[i].name,pos[i].min_pay__c,pos[i].max_pay__c,emp[i].name,emp[i].passport_number__c));
      }
      return wrapcls;
  }
  public class testwrapperclass
{
  public string pname{get;set;}
  public integer maxsal{get;set;}
  public integer minsal{get;set;}
  public string ename{get;set;}
  public string passportnumber{get;set;}
 
  public testwrapperclass(string pname,integer maxsal,integer minsal,string ename,string passportnumber)
  {
      this.pname= pname;
      this.maxsal=maxsal;
      this.minsal=minsal;
      this.ename=ename;
      this.passportnumber = passportnumber;
     
   }
}
}