• mahi1
  • NEWBIE
  • 40 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
Hi I'M new to salesforce.com. I'm unable to do code coverage for this below coved my test code is covering 63% only what i have learnt from my training class is simply by covering methods in the class we will get 75%

class:
--------
public with sharing class AccFieldsIn2DiffVfToSave_cls {

    public PageReference doSave() {
        insert objA;
        return (new pagereference('/apex/AccFieldsIn2DiffVfToSave2?id='+obja.Id).setredirect(true));
    }


    public Account objA { get; set; }
   
    public AccFieldsIn2DiffVfToSave_cls(){
        objA = new Account();
    }
}

test class:
--------------

@isTest
private class AccFieldsIn2DiffVfToSave2_tst{
    static testmethod void mytest(){
   
        AccFieldsIn2DiffVfToSave2 obj = new AccFieldsIn2DiffVfToSave2 ();
                  
            obj.doSave();
    }
}
  • May 02, 2014
  • Like
  • 0
Hi All,

        How to Import Contacts from Excel Sheet Using Visulaforce page


Thanks in advance
  • March 28, 2015
  • Like
  • 1
Hi all,
    How to get Latitude and Longitude Values dynamically to update while inserting Records into Object




Thanks in Advance.
  • December 11, 2014
  • Like
  • 2
Hi All,

        I have a requirement that i need to display all Contacts and Leads of an Aorganization on Visualforce Page by Using google maps

Please any one provide solution,

Thanks in advance.
  • December 01, 2014
  • Like
  • 0
hi,
i created a custom Text filed (Pincode__c) , I need to write a trigger for this field to accept only numbers
  • April 24, 2014
  • Like
  • 0
hi, iam using this code in my visualforcepage to execute jquery but iam getting 

Error: <apex:page> is required and must be the outermost tag in the markup at line 1 column 1   this error

my vfpage code:

&lt;apex:page showHeader=&quot;false&quot; sidebar=&quot;false&quot; standardStylesheets=&quot;false&quot;&gt;

&lt;/apex:page&gt;


any one can help.
  • April 11, 2014
  • Like
  • 0

Hi,

i want to add one more column to pageblocktable with the name of "Field Length" ,

How can i get field length in that column.....

 

<apex:page standardController="objectName" sidebar="false">
<apex:pageBlock title="Fields in Proper Names">
<apex:pageBlockTable value="{!$ObjectType.objName.FieldSets.empfield}" var="f">
<apex:column headervalue="Field Name" value="{!f}"/>
<apex:column headervalue="Field Label" value="{!f.Label}"/>
<apex:column headervalue="Data Type" value="{!f.Type}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>

  • August 10, 2012
  • Like
  • 0
Hi All,

        How to Import Contacts from Excel Sheet Using Visulaforce page


Thanks in advance
  • March 28, 2015
  • Like
  • 1
Hi all,
    How to get Latitude and Longitude Values dynamically to update while inserting Records into Object




Thanks in Advance.
  • December 11, 2014
  • Like
  • 2
Hi All,

        How to Import Contacts from Excel Sheet Using Visulaforce page


Thanks in advance
  • March 28, 2015
  • Like
  • 1
Hi I'M new to salesforce.com. I'm unable to do code coverage for this below coved my test code is covering 63% only what i have learnt from my training class is simply by covering methods in the class we will get 75%

class:
--------
public with sharing class AccFieldsIn2DiffVfToSave_cls {

    public PageReference doSave() {
        insert objA;
        return (new pagereference('/apex/AccFieldsIn2DiffVfToSave2?id='+obja.Id).setredirect(true));
    }


    public Account objA { get; set; }
   
    public AccFieldsIn2DiffVfToSave_cls(){
        objA = new Account();
    }
}

test class:
--------------

@isTest
private class AccFieldsIn2DiffVfToSave2_tst{
    static testmethod void mytest(){
   
        AccFieldsIn2DiffVfToSave2 obj = new AccFieldsIn2DiffVfToSave2 ();
                  
            obj.doSave();
    }
}
  • May 02, 2014
  • Like
  • 0
hi, iam using this code in my visualforcepage to execute jquery but iam getting 

Error: <apex:page> is required and must be the outermost tag in the markup at line 1 column 1   this error

my vfpage code:

&lt;apex:page showHeader=&quot;false&quot; sidebar=&quot;false&quot; standardStylesheets=&quot;false&quot;&gt;

&lt;/apex:page&gt;


any one can help.
  • April 11, 2014
  • Like
  • 0