• Ashok S 7
  • NEWBIE
  • 165 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 57
    Questions
  • 43
    Replies
hai guys,

I have a requirment.
When creating a new in the custom object new button not visible in the standard page layouts.
How can i visible the new button in standard page layouts.please help me.

IN the profile level i given view all and modify all permissions
 
hai guys,
I have one requirments i have two objects one is x and another one is y . x and y have lookup relationship x object contains two fields.
1.primary exp.2.secondary exp. y object contains role field it is a picklist field when role value is primary then increment primary exp the value in the  x object same as when role value is secondary then increment secondary exp value in the x object.
how can i slove this requirment .please help me urgent
Hi guys,
I have one requirments .Responsible object and contains status and response fields are there.
When the status is equal to accepted or not accepted then i want to give edit access to the user for response field.
How it is possible please help me.
Requirment is:
I have two objects one is A and another one is B .
A is a standard object 
B is a custom object.
In b i created one field name x which is picklist value.
a and b have lookup relation from b to a.
when in b object create new given the x value after save that record that x value automatically populated in a object record.
how can i slove this req . please help me.
Hai guys.
requirment:
write a trigger on account object then trigger will evaluate the salary and will restrict to user to change the values.Use before update and compare trigger.old and trigger.new

please help me to slove this requirment
Hai Guys,
I want to know what is the size of list can any one tell me please
hai Guys,
i am writing the test class.In my test class i cover all the line except 2 lines.
Apex class calss
------------------------------------
public class Create_Controller {

    private Employee_Information__c emp;
    private ApexPages.standardcontroller cont;
    public Create_Controller(ApexPages.StandardController controller) 
    {
      cont = controller;
      this.emp = (Employee_Information__c)controller.getRecord();  
    }
    
    public pagereference save()
    {
    
          try
          {
             insert emp;
             return new pagereference('/apex/List_Vf_Page');
          
          }
          catch(Exception e)
          {
          
              ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,e.getmessage()));
              return null;
          
          }
    
    
        return null;
    
    }

Test class class
---------------------------------------------
@isTest(seealldata=true)
public class Create_Controller_Test
{
     public static testmethod void testinsert()
     {
     
        Employee_Information__c ei = new Employee_Information__c();
        ei.First_Name__c = 'Naveen';
        ei.Middle_Name__c = 'Ashok';
        ei.Last_Name__c = 'Sirivella';
        ei.Date_of_Birth__c = Date.Today();
        ei.Father_Husband_Name__c = 'Lakshmi Pathi';
        ei.Marital_Status__c = 'Single';
        
        insert ei;
        
        Test.startTest();
        
         pagereference pg = page.Create_vf_page;
         test.setcurrentpage(pg);
         
         Apexpages.StandardController sc = new Apexpages.StandardController(ei);
         
          Create_Controller cc = new  Create_Controller(sc);
         
         cc.save();
        
        
        Test.stopTest();
     
     
     
     }
 


}

but following lines are not cover
User-added image

the above lines are not covered 
please help me
 
hai guys,
i have one doubts. What is it means
How many records we have display on visual force page.

how many records we display by using the reports.

please tell me any one.
Hai guys good morning.
I have one scenario. i have custom objects ex and i give owd is private.
Created profile p1 and assigned to the user in that profile i give read,edit,update permission. Than what will happen if the user creae the records for custom object ex.

please explain me
Hai Guys.
When i doing the trailhead projects reports and dash boards.
i creating the dashboards following error is coming .
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: JDVMZQOC 

please tell me how to rectify the following error please
hai,
when i am test class to the controller it is covering only if part and not covering the else part
controller
---------------------
public class customAccountlistcontroller 
{
  public ApexPages.StandardSetController ssc{get; private set;}
  public list<SelectOption> sizeOptions{get;private set;}
  public String chosenSize{get;set;}
  public CustomAccountlistcontroller()
  {
     ssc = new ApexPages.StandardSetController([select id,Name,Rating,NumberOfEmployees from Account limit 500]);
     sizeOptions = new List<SelectOption>();
     {
       new SelectOption('small','small');
       new SelectOption('medium','medium');
       new SelectOption('large','large');
     }
     chosenSize = 'small';
     //ApplyFilter();
   }
   public List<Account> GetAccounts()
   {
      return (List<Account>)ssc.GetRecords();
   }
   
   public Pagereference ApplyFilter()
   {
     String query = 'select id,name,Rating,NumberOfEmployees from Account where';
     if(chosenSize == 'small')
     {
        query += 'Employees <=100';
     }
     else if(chosenSize == 'medium')
     {
       query += 'Employees > 100 and Employees <= 500';
     }
     else
     {
      query += 'Employees > 500';
     }
     query += 'limit 500';
     ssc = new ApexPages.StandardSetController(Database.Query(query));
     return null;
  
   }
}
testclass
----------------------
@isTest
public class Test_customAccountlistcontroller 
{
    public static testmethod void testcustomaccount()
    {
      //using the pagereference
      pagereference pg = page.Advanced_Filtering_vf_page;
        test.setCurrentPage(pg);
        //calling the controller into the testclass
      customAccountlistcontroller cac = new customAccountlistcontroller();
        //calling the methods in the testclass
        cac.GetAccounts();
        cac.ApplyFilter();
        
    }
}
when i run the testclass it is covering the if part but did not cover else part.
following image display the which part is covering and which part is not cover
User-added image
hai guys,
when i am writing the test class controller it is getting  following errors

controller
---------------------------
public class Advanced_Dashboard1 {

    public list<Case> getCase1() {
        return [select Status,Subject from case where contact.name = 'Smith' and Status != 'Closed' limit 5];
    }


    public string getContactname() {
        return 'Smith';
    }

}

testclass
------------------------
@isTest
public class Test_Advanced_Dashboard1 
{
    //calling controller class into the test class
    Advanced_Dashboard1 ad = new Advanced_Dashboard1();
    list<case> caselist = [select Status,Subject from case where contact.name = 'Smith' and Status != 'Closed' limit 5];
    //calling methods into the testclass
    ad.getCase1();
    ad.getContactname();
}

when i saving the test testclass following error is occuring
Method must define a body 
i did not why it is coming .please help me slove this problem.
 
Hai guys.

When i am writng the the testclass for following controller it is displaying the error.
controller
-----------------
public class Action_Function_Controller 
{
   public Account acobj{get;set;}
   pagereference pag = null;
   public Action_Function_Controller()
   {
       acobj = new Account();
   }
  
    public pagereference save()
    {
       // creating if condidtion
       if(acobj.name != '')
       {
       
          insert acobj;
        }
        else
        {
           //creating a error message
           ApexPages.Message msg = new ApexPages.Message(ApexPages.SEVERITY.ERROR,'Error:Enter Name');
           ApexPages.addMessage(msg);
           
        
        }
        //Creting another if condition
        if(acobj.id != null)
        {
          // Send the user to the detail page for the new account.
          pag = new pagereference('/'+acobj.id);
          pag.setredirect(true);
        }
        return pag;
      }

}
testclass
-------------------------
@isTest
public class  ActionFunctionControllerTest
{
    public static testmethod void testfunction()
    {
          //inserting record into the account object
          Account acc = new Account();
          acc.name = 'Test Account';
          acc.industry = 'Accounts';
          insert acc;
          
        //using the page reference
        pagereference pg = page.Action_Function_VF_PAge;
        test.setcurrentpage(pg);
        
        //calling controller class
        Action_Function_Controller afc = new Action_Function_Controller();
        //calling the variables into testclass
        //afc.acobj;
        if(acc.name !='')
        {
           insert acc;
        }
        afc.save();
        
          
    }
}
when i run the test class following are occured
System.DmlException: Insert failed. First exception on row 0 with id 00128000008E4KRAA0; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]
Please help me any one.
Hai,
Display records from 2 different object in a single table using Wrapper class
i created the vf page and controller
vf page
---------------------------
<apex:page controller="Wrapperclass_controller" >
 <apex:form >
 <apex:pageBlock >
 <apex:pageBlockSection >
 <apex:pageBlockTable value="{!lstwrapperstring}" var="ll">
 <apex:column headerValue="Action">
 <apex:inputCheckbox />
 </apex:column>
 
 <apex:column headerValue="Position Name">
 {!ll.pname}

 </apex:column>
 
 <apex:column headerValue="Job Description">
 {!ll.pjdescription}

 </apex:column>
 
 <apex:column headerValue="Location">
 {!ll.plocation}

 </apex:column>
 
 <apex:column headerValue="MAximum Pay">
 {!ll.pmaxpay}

 </apex:column>
 
 <apex:column headerValue="Candidate  FName">
 {!ll.cfname}
 
 </apex:column>
 
 <apex:column headerValue="Candidate LName">
 {!ll.clname}
 
 </apex:column>
 </apex:pageBlockTable>
 </apex:pageBlockSection>
 </apex:pageBlock>
 </apex:form>
</apex:page>

controller
-------------------------------
public class Wrapperclass_controller
{
      list<Position__c> plist = new list<Position__c>();
      list<Candidate__c> clist = new list<Candidate__c>();
      list<Wrapper> wlist = new list<Wrapper>();
      public list<Wrapper> getLstwrapperstring()
      {
        plist = [select Position_Name__c,Location__c,Job_Description__c,Max_Pay__c from Position__c limit 10];
        clist = [select     First_Name__c,Last_Name__c from Candidate__c];
        //integer p = plist.size();
        for(integer i=0; plist.size();i++)
        {
           wlist.add(new Wrapper(plist[i].Position_Name__c,plist[i].Location__c,plist[i].Job_Description__c,plist[i].Max_Pay__c,clist[i].First_Name__c,
                                          clist[i].Last_Name__c));
        }
        return wlist;
      }
       public class Wrapper
       {
          public string pname{get;set;}
          public string pjdescription{get;set;}
          public string plocation{get;set;}
          public decimal pmaxpay{get;set;}
          public string cfname{get;set;}
          public string clname{get;set;}
          public Wrapper(string pname,string pjdescription,string plocation,decimal pmaxpay,
                        string cfname,string clname)
          {
             this.pname= pname;
             this.pjdescription = pjdescription;
             this.plocation = plocation;
             this.pmaxpay = pmaxpay;
             this.cfname = cfname;
             this.clname = clname;
       
          }
        }
       
       
}

But when i saving the code it will display following error
Wrapperclass_controller Compile Error: Loop condition must be of type Boolean: Integer
i did not understand to slove this problem.please help me
Hai,
I have one requirement.
opportunity object is there it is self relationship.it contains revenue field.It contains 20 releative opportunities. it is possible to sum all the revenue field values and diplay on the record detail page . this requirement is done in the trigger only.

please help me any one
Hai,
I am using static resource in my visual force page. But in that visual force i used alert message and toggle function. but it is not working properly.I tried but it is not comming.
Vf page
--------------------------
<apex:page >
  <apex:includeScript value="{!URLFOR($Resource.jqueryui,'/Naveen/jquery/jquery.js')}"/>
  <apex:includeScript value="{!URLFOR($Resource.jqueryui,'/Naveen/jquery/jquery-ui.js')}"/>
  <script>
  j$=jQuery.noConflict();
  if(j$){
            alert('Success');
  }
  else
  {
            alert('Failure');
  }
  function show()
  {
      j$('[id$=one]').toggle()
  }
  </script>
  <apex:pageBlock id="pb" title="FirstBlock" onmouseover="show()">
  This is Block one
  </apex:pageBlock>
  
  <apex:pageBlock id="one" title="FirstBlock">
  This is Block one
  </apex:pageBlock>
</apex:page>

Any one help me to slove this.Please.
Hai,
My requirment is when i click on list page that means i created output link for id click that id it will navigate to record view page but it is not displaying values to the record view page
i write vf page and code
vf page
=----------------------
<apex:page controller="list_controller1" sidebar="false" tabStyle="Employee_Information__c">
<apex:form >
<apex:pageBlock title="Employee List">
<apex:pageBlockSection title="Employee Information Displaying ">
<apex:pageBlockTable value="{!empdetails}" var="e">
<apex:column headerValue="ID">
<apex:outputLink value="https://c.ap2.visual.force.com/apex/Record_detail_Vf_Page?id = e.id">{!e.id}</apex:outputLink>
</apex:column>
<apex:column value="{!e.First_Name__c}"/>
<apex:column value="{!e.Middle_Name__c}"/>
<apex:column value="{!e.Last_Name__c}"/>
<apex:column value="{!e.Date_of_Birth__c}"/>
<apex:column value="{!e.Father_Husband_Name__c}"/>
<apex:column value="{!e.Marital_Status__c}"/>
</apex:pageBlockTable>

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

controller
------------------------------
public class list_controller1
{

    public Employee_Information__c[] getEmpdetails()
    {
        empdetails = Database.query(query);
        return empdetails;
    }

    Employee_Information__c[] empdetails;
    string query = 'select id,First_Name__c,Middle_Name__c,Last_Name__c,Date_of_Birth__c,Father_Husband_Name__c,Marital_Status__c from Employee_Information__c';

    

}

please help me any one
User-added imageUser-added image

in the first image i click the id link it will navigate to secong image but here values are not displaying for fields .
please help me
any one
Hai,
How create custo record detail page by using standard controller (or) custom controller
here my vf page
<apex:page sidebar="false" standardController="Employee_Information__c" >
<apex:form >
<apex:pageBlock title="Record Detail Page">
<apex:pageBlockSection title="Record Page">
<p> First Name  :::   {!Employee_Information__c.First_Name__c} Employee_Information__c</p>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

please help me any one
Hai,
I want try actionpoller component in vf page but it is not working 
vf page code
<apex:page controller="ActionPollar_Controller" showHeader="true" tabStyle="case" sidebar="false">
<apex:form >
<apex:pageBlock >
<h1>Company Details</h1>
<apex:pageBlockTable id="compde" value="{!compdetails}" var="i">
<apex:column headerValue="Name"/>
<apex:outputLink value="/{!i.id}">{!i.Name}</apex:outputLink>

</apex:pageBlockTable>
</apex:pageBlock>
<apex:actionPoller action="{!pollAction}" reRender="compde" interval="10"/>
</apex:form>
</apex:page>
controller
-----------------

public class ActionPollar_Controller 
{

    public Account[] getCompdetails() {
         compdetails = Database.query(query);
        return compdetails;
    
    }

    Account[] compdetails;
    string query = 'select id,name from  Account limit 15';
    
    public pagereference pollAction()
    {
        compdetails = Database.query(query);
        return null;
    
    }

}

how can i do .please help me
Hai,
I want to display account related object record on visual force page.
For example  when i display Account record and also display contacr record also.
please help me any one.
Hai,
I am using static resource in my visual force page. But in that visual force i used alert message and toggle function. but it is not working properly.I tried but it is not comming.
Vf page
--------------------------
<apex:page >
  <apex:includeScript value="{!URLFOR($Resource.jqueryui,'/Naveen/jquery/jquery.js')}"/>
  <apex:includeScript value="{!URLFOR($Resource.jqueryui,'/Naveen/jquery/jquery-ui.js')}"/>
  <script>
  j$=jQuery.noConflict();
  if(j$){
            alert('Success');
  }
  else
  {
            alert('Failure');
  }
  function show()
  {
      j$('[id$=one]').toggle()
  }
  </script>
  <apex:pageBlock id="pb" title="FirstBlock" onmouseover="show()">
  This is Block one
  </apex:pageBlock>
  
  <apex:pageBlock id="one" title="FirstBlock">
  This is Block one
  </apex:pageBlock>
</apex:page>

Any one help me to slove this.Please.
Hai guys,
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>').
how can i achieve it.
my vf page code is
<apex:page standardController="Account" recordSetVar="accounts">
  <apex:form >
  <apex:repeat value="{!accounts}" var="a">
 
  
 <li> <apex:outputLink value="/apex/AccountList?id=00128000005LpU9">
  
  {!Account.Name}
  
  </apex:outputLink>
</li>
  </apex:repeat>
  
  
  </apex:form>
</apex:page>
can any one help me
Hai guys,
my requirment is calculate the size of set
vf page
------------------
<apex:page controller="SetExample_Controller">
  <apex:pageblock >
  <apex:pageBlockTable value="{!names}" var="v">
  <apex:column value="{!v}"/>
  </apex:pageBlockTable>
  </apex:pageblock>
</apex:page>

controller
---------------------
public class SetExample_Controller 
{
  public set<string> names{get;set;}
  public SetExample_Controller()
  {
     names = new set<string>();
     names.add('one');
     names.add('two');
     names.add('sam');
     names.add('one');
     names.add('one');
     
  }
  public Integer size()
  {
     Integer mysize = names.size();
  
     return mysize;
  } 
}

plesae help me
Here my requirement is how to use the  
public static JSON2Apex parse(String json) {
        return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
        }
in my test class
my test class is following here
@istest(seeAllData = true)
public class allPatntsRcrdsCtrlr_Test
{
    public static JSON2Apex parse(String json) {
        return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
        }
   public static testmethod void test()
   {
      test.startTest();
     //inserting a record into the Account object
     Account acc = new Account();
     acc.Name = 'Sample Account';
     insert acc;
     
     //Inserting a Record into contact object
     Contact c = new Contact();
     c.Accountid = acc.id;
     c.Department = 'Testing';
     c.LastName = 'Test';
     insert c;
     
     //inserting a record into the Paitent object
     Patient__c pt = new Patient__c();
     pt.BlueStarID__c = 'fdsrt1224565';
     pt.Name = 'Sample'; 
     pt.Patient_First_Name__c = 'Test'; 
     pt.Patient_Id__c= 'sder45789'; 
     pt.Patient_Last_Name__c='Sample1'; 
     pt.ExternalID__c= 'sader22244578'; 
     pt.ProviderName__c= ''; 
     pt.SRType__c= 'Yes'; 
     pt.SampleCode__c= 'No'; 
     pt.ServiceRequestID__c= 12456789; 
     pt.UserID__c= 2456789;
     insert pt;
     //calling a pagereference in testclass
     PageReference pg = page.allPatientRecords;
     pg.getparameters().put('id',string.valueOf(pt.id));
     test.setcurrentpage(pg); 
     
     //calling the controller name
     allPatntsRcrdsCtrlr aprc = new allPatntsRcrdsCtrlr();
     //calling wrapperclass in test class
     
     
     //aprc.patlist  = pt;
     aprc.strBody = 'Plain';
     aprc.idv = 'Test';
     aprc.searchVal = '';
     aprc.searchFields = 'ProviderName';
     aprc.labeling = 'ProviderName';
     aprc.show = false;
     aprc.lstrecdstb1 = false;
     aprc.queryflds = true;
     aprc.pdfrendered = false;
     aprc.showmessage = true;
     aprc.wordRendered = true;
     aprc.xlRendered  = true;
     //calling methods in testcalss
     
      allPatntsRcrdsCtrlr aprc1 = new allPatntsRcrdsCtrlr();
     //calling wrapperclass in test class
     
     
     //aprc.patlist  = pt;
     aprc1.strBody = 'Rectangle';
     aprc1.idv = 'Test';
     aprc1.searchVal = '';
     aprc1.searchFields = 'BlueStarID';
     aprc1.labeling = 'BlueStarID';
     aprc1.show = false;
     
     aprc1.lstrecdstb1 = false;
     aprc1.queryflds = true;
     aprc1.pdfrendered = false;
     aprc1.showmessage = true;
     aprc1.wordRendered = true;
     aprc1.xlRendered  = true;
     
     allPatntsRcrdsCtrlr aprc2 = new allPatntsRcrdsCtrlr();
     //calling wrapperclass in test class
     
     
     //aprc.patlist  = pt;
     aprc2.strBody = 'Square';
     aprc2.idv = 'Test';
     aprc2.searchVal = 'Test';
     aprc2.searchFields = 'Patient_First_Name__c';
     aprc2.labeling = 'Patient_First_Name__c';
     aprc2.show = false;
     /*
     aprc2.lstrecdstb1 = false;
     aprc2.queryflds = true;
     aprc2.pdfrendered = true;
     aprc2.showmessage = true;
     aprc2.wordRendered = true;
     aprc2.xlRendered  = true;
     */
     allPatntsRcrdsCtrlr aprc3 = new allPatntsRcrdsCtrlr();
     //calling wrapperclass in test class
     
     
     //aprc.patlist  = pt;
     aprc3.strBody = 'square';
     aprc3.idv = 'Test';
     aprc3.searchVal = 'Sample1';
     aprc3.searchFields = 'Patient_Last_Name__c';
     aprc3.labeling = 'Patient_Last_Name__c';
     aprc3.show = false;
     
     aprc3.lstrecdstb1 = false;
     aprc3.queryflds = true;
     aprc3.pdfrendered = false;
     aprc3.showmessage = true;
     aprc3.wordRendered = true;
     aprc3.xlRendered  = true;
     
     
     aprc.clear();
     //aprc.patinfo();
     //aprc.PatientData();
     aprc.retrieve();
     
     //aprc.doSearch();
     //aprc.ExpXL();
    
     aprc.ExpPDF();
     aprc.ExpWord();
     aprc.getlabeling();
     aprc.getsearchFields();
     
      allPatntsRcrdsCtrlr.oAuthRecords ar = new allPatntsRcrdsCtrlr.oAuthRecords();
          ar.BlueStarID = '';
          ar.HubCode    = 'asd145789jjhgdrt';
          ar.PatientName = 'Pointing';
          ar.PatientFirstName = 'John';
          ar.PatientID   = 'serer45789dfh';
          ar.PatientLastName = 'Ricky';
          ar.ProviderName   = '';
          
          ar.SRType = 'Active';
          ar.SampleCode = 'Yes';
          ar.ExternalID = '1245gggtder214578';
          ar.ServiceRequestID = 20001457;
          ar.UserID  = 457896321;
      allPatntsRcrdsCtrlr.JSON2Apex ja = new allPatntsRcrdsCtrlr.JSON2Apex();
      ja.access_token = 'hfert45778969jhgt';
     List<Apexpages.Message> pageMessages = ApexPages.getMessages();
     test.stopTest();
   }
}
hai guys,
I have one requirments i have two objects one is x and another one is y . x and y have lookup relationship x object contains two fields.
1.primary exp.2.secondary exp. y object contains role field it is a picklist field when role value is primary then increment primary exp the value in the  x object same as when role value is secondary then increment secondary exp value in the x object.
how can i slove this requirment .please help me urgent
Hai guys.
requirment:
write a trigger on account object then trigger will evaluate the salary and will restrict to user to change the values.Use before update and compare trigger.old and trigger.new

please help me to slove this requirment
Hai,
My requirment is when i click on list page that means i created output link for id click that id it will navigate to record view page but it is not displaying values to the record view page
i write vf page and code
vf page
=----------------------
<apex:page controller="list_controller1" sidebar="false" tabStyle="Employee_Information__c">
<apex:form >
<apex:pageBlock title="Employee List">
<apex:pageBlockSection title="Employee Information Displaying ">
<apex:pageBlockTable value="{!empdetails}" var="e">
<apex:column headerValue="ID">
<apex:outputLink value="https://c.ap2.visual.force.com/apex/Record_detail_Vf_Page?id = e.id">{!e.id}</apex:outputLink>
</apex:column>
<apex:column value="{!e.First_Name__c}"/>
<apex:column value="{!e.Middle_Name__c}"/>
<apex:column value="{!e.Last_Name__c}"/>
<apex:column value="{!e.Date_of_Birth__c}"/>
<apex:column value="{!e.Father_Husband_Name__c}"/>
<apex:column value="{!e.Marital_Status__c}"/>
</apex:pageBlockTable>

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

controller
------------------------------
public class list_controller1
{

    public Employee_Information__c[] getEmpdetails()
    {
        empdetails = Database.query(query);
        return empdetails;
    }

    Employee_Information__c[] empdetails;
    string query = 'select id,First_Name__c,Middle_Name__c,Last_Name__c,Date_of_Birth__c,Father_Husband_Name__c,Marital_Status__c from Employee_Information__c';

    

}

please help me any one
User-added imageUser-added image

in the first image i click the id link it will navigate to secong image but here values are not displaying for fields .
please help me
any one

please explain antoher requirment details please
The Apex class must be called 'AccountHandler' and be in the public scope.
The Apex class must have a public static method called 'insertNewAccount'.
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
Hai guys.
i Have the following requirment.
The Apex class must be called 'ContactAndLeadSearch' and be in the public scope.
The Apex class must have a public static method called 'searchContactsAndLeads'.
Because SOSL indexes data for searching, you must create a Contact record and Lead record before checking this challenge. Both records must have the last name 'Smith'. The challenge uses these records for the SOSL search.
The return type for 'searchContactsAndLeads' must be 'List<List< SObject>>'
The 'searchContactsAndLeads' method must accept an incoming string as a parameter, find any contact or lead that matches the string as part of either the first or last name and then return those records.

as per above requirment i created the class
public class ContactAndLeadSearch
{
    public static List<List< SObject>> searchContactsAndLeads(string s1,string s2)
    {
      list<contact> conlist = new list<contact>();
      list<lead> leadlist = new list<lead>();
       List<List< SObject>> ss = [Find 's1' IN ALL FIELDS Returning contact(lastname),lead(name,company)];
       conlist =((list<Contact>)ss[0]);
       leadlist = ((list<lead>)ss[1]);
       return null;
     }
}

and i getting the following error
Executing the 'searchContactsAndLeads' method failed. Either the method does not exist, is not static, or does not return the expected search results.
please help me any one
 
Hai guys .
I have one requirment. THat is When create a button for standard or custom object .When i click that button an email is send to the record owner.
How it is possible.cani any one help me
Hai guys,
I have a requirment.
The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
As of my understanding i created apex class.

public class StringArrayTest  {   public static list<string> generateStringArray()     {         list<string> ss = new list<string>();         ss.add('Test 0');         ss.add('Test 1');         ss.add('Test 2');         ss.add('Test 3');         ss.add('Test 4');         ss.add('Test 5');         ss.add('Test 6');         ss.add('Test 7');         ss.add('Test 8');         system.debug('the list of strings are='+ss);         return ss;     }    }

but it is not staisfy the requirement .please help me any to slove the requirment
 
Hai guys ,
I write the simple trigger.Then i want to write a test class but i didnot know how to write the test class for the trigger.
please help me any one.
here is my code
----------------------------------------------------------------
trigger Accountinsert on Account (before insert) 
{
    for(Account a:trigger.new)
    {
        list<Account> myacc = [select id,name from Account where name=:a.name];
        if(myacc.size()>0)
        {
            a.name.addError('Already this name is exist');
        }
        
    }

}
Hai,
My requirment is when i select follow-on is new and jonined opp is checked then Orn is not generated automatically.
Here ORN is autonumber:
please help any one
Hai Guys.
You’ve been asked to create a new Lead trending dashboard. Rather than creating the dashboard from scratch, install a CRM adoption dashboard package from the AppExchange into your Developer Edition environment and update one of the dashboard components as specified below. (Note: While it's a best practice to always clone a dashboard before you modify it, for this example, you can go ahead and modify the dashboard directly).Install Salesforce Adoption Dashboards from the AppExchange into your Developer Edition.
Refresh the '3 - Sales & Marketing Adoption' dashboard in the 'Salesforce Adoption Dashboards' folder at least once.
In '3 - Sales & Marketing Adoption' dashboard, change the dashboard component for 'New LEAD Trend by Source' to a pie chart and set the wedges to Lead Source.
please tell me how to slove above requirments . tell me simple way
 
hai guys.
In my controller i used integer data type for id. but in the test take the id as string and assign to the integer id .It displaying theIllegal assignment from String to Integer  how can slove it
here my controller 
-----------------------------------------
public class fetchingController {

    public list<Book__c>  bookList {get;set;}
    public Integer id{get;set;}
    public Integer uid{get;set;}

    public fetchingController(){
           bookList = [Select Id ,Name , author__c , title__c , price__c from Book__c];

    }

// Method to delete Record  
        public PageReference deleteBook() {
                String bookId = ApexPages.currentPage().getParameters().get('id');
                System.debug('book lsit id is--------------------- '+bookId);
                if (bookId!=''){
                 Book__c book = [Select id from Book__c where id=:bookId ];
                  delete book ;
                }
        return null;
   }

   // Method to update Book Record 

   public PageReference updateBook() {
        String bookUid = ApexPages.currentPage().getParameters().get('uid');
        System.debug('The id for update is ------------------'+bookUid);
        if (bookUid!=''){
        Book__c book =[select Id  from Book__c where id = : bookUid];
            book.Author__c = 'Naveen';
        update book;
        }
        return null;
   }

}
testclass
--------------------------------------
@isTest
public class fetchingController_Test
{
     public static testmethod void fetch()
     {
         test.startTest();
         //inserting values to the book object
         Book__c b = new Book__c();
         b.Author__c = 'Mc growth ';
         b.Discount__c = 15;
         b.Price__c = 2500;
         b.Title__c = 'Advanced Java';
         insert b;
 
 
         //including pagereference in the test class
         pagereference pg = page.Example1_Vf_Page;
         pg.getparameters().put('id',string.valueOf(b.id));
         test.setcurrentpage(pg);


         //include the class name
         
         //string s = ApexPages.currentPage().getParameters().put('id',b.id);
         //system.debug('the value of ss='+s);
         
         //string s1 = ApexPages.currentPage().getParameters().put('id',b.id);
         //system.debug('the value of s1='+s1);
         
         fetchingController fc= new fetchingController();
         //calling the variables
         fc.id = ApexPages.currentPage().getParameters().get(b.id);
         fc.uid = ApexPages.currentPage().getParameters().get(b.id);
         
         //calling the methods
         fc.updateBook();
         fc.deleteBook();

         test.stopTest();
    }
}
 
in my controller i have two controllers are there.
1.standard controller
2.standardsetcontroller 
i am confused which one i have to take in the test class.
please help me any one.