• kanavkhurana
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi All,

I have a Utility Class, 'TestDataGenerator' for generating test records. I have applied the '@isTest' annotation to this class. However, it's showing up in the overall code coverage (see screenshot below). As I understand, Test classes themselves are not included in the overall code coverage calculation. Please help!

User-added image

User-added image
Hi,

I am creating a grouped Visualforce chart as follows:

User-added image

The issue is that I am able to put a label, 'Low' in this case, only atop the first bar, ie, 'Attractiveness'. I need to able to do the same for the 'Our Presence' bar. My VF code is as follows:

<apex:page standardController="Account_Plan__c" extensions="LineAndBarController" showHeader="false" sidebar="false" readOnly="true">
    <apex:chart width="600" height="275" data="{!dataMap}">
        <apex:legend position="left"/>
        <apex:axis type="Numeric" position="left" fields="attractiveness,ourpresence"
            title="Rating" grid="true" minimum="0" maximum="3" steps="2">

        </apex:axis>
        <apex:axis type="Category" position="bottom" fields="buyingCentre"
            title="Corporate Buying Centres">
        </apex:axis>
        <apex:barSeries title="Attractiveness,Our Presence" orientation="vertical"
            axis="left" xField="buyingCentre" yField="attractiveness,ourpresence" tips="false" groupGutter="10" gutter="10">
            <apex:chartLabel field="label1" display="outside"/>
            <apex:chartLabel field="label2" display="outside"/>
            
        </apex:barSeries>
    </apex:chart>
</apex:page>

And the controller:
public with sharing class LineAndBarController {
    public class GraphData{
        public String buyingCentre;
        public Integer attractiveness;
        public Integer ourpresence;
        public String label1;
        public String label2;
        
    }
    public List<GraphData> dataMap{get;set;}
    public LineAndBarController(ApexPages.StandardController sc){

        dataMap = new List<GraphData>();

        
        GraphData graphData = new GraphData();
        graphData.buyingCentre = 'Global IT';
        graphData.attractiveness = 1;
        graphData.ourpresence = 2;
        graphData.label1='Low';
        graphData.label2='Medium';

        dataMap.add(graphData);

    }
    
  }
Note that I'm using two <apex:chartLabel> tags inside the <apex:barSeries> tag, however, only the first one seems to be taking effect.

Any help would be much appreciated! Thanks! :)




Hi All,

 

This is with reference to the new SDK Mobile Packs, and specifically to the Jquery Mobile HTML5 App given on the following Salesforce.com Mobile SDK link:

 

http://www2.developerforce.com/mobile/getting-started/html5#jquery

 

,under the heading 'Install the Mobile Pack for jQuery Mobile into your DE Org'.

 

 

The App consists of one VF page: MobileSample_jQueryMobile. I ran this app via the browser and it was very smooth and fluid. No issues. 

Then, using the 'Ant' command given in the Mobile SDK user guide, I generated a Hybrid App for Android with the Target VF page specified. I downloaded the App on my Samsung S3 and ran it. It was quite slow and sluggish. The animations were also appearing less fluid.

 

Is this a common observation with Hybrid Apps? I haven't modified the code at all. Any suggestions??

Thank you!! 

 

Hi All,

I have a Utility Class, 'TestDataGenerator' for generating test records. I have applied the '@isTest' annotation to this class. However, it's showing up in the overall code coverage (see screenshot below). As I understand, Test classes themselves are not included in the overall code coverage calculation. Please help!

User-added image

User-added image
Create a simple Visualforce page that when given a contact ID will display that contact, the account that it is associated to, as well as the billing street.
I've followed the W2L steps online but my leads are not showing up in my sandbox. I have done a few different tests to determine the problem and still nothing. 

I'm wondering if it Is it because our Leads page is a visual Force page? Do I need to modify the code?

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: Please add the following <META> element to your page <HEAD>.      -->
<!--  If necessary, please modify the charset parameter to specify the        -->
<!--  character set of your HTML page.                                        -->
<!--  ----------------------------------------------------------------------  -->

<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: Please add the following <FORM> element to your page.             -->
<!--  ----------------------------------------------------------------------  -->

<form action="http://cs1.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type=hidden name="oid" value="00DJ0000003KLf9">
<input type=hidden name="retURL" value="http://blueearthlabs.com">

<!--  ----------------------------------------------------------------------  -->

<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="company">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br>

<label for="city">City</label><input  id="city" maxlength="40" name="city" size="20" type="text" /><br>

<label for="state">State/Province</label><input  id="state" maxlength="20" name="state" size="20" type="text" /><br>

<input type="submit" name="submit">

</form>

Hi All,

 

This is with reference to the new SDK Mobile Packs, and specifically to the Jquery Mobile HTML5 App given on the following Salesforce.com Mobile SDK link:

 

http://www2.developerforce.com/mobile/getting-started/html5#jquery

 

,under the heading 'Install the Mobile Pack for jQuery Mobile into your DE Org'.

 

 

The App consists of one VF page: MobileSample_jQueryMobile. I ran this app via the browser and it was very smooth and fluid. No issues. 

Then, using the 'Ant' command given in the Mobile SDK user guide, I generated a Hybrid App for Android with the Target VF page specified. I downloaded the App on my Samsung S3 and ran it. It was quite slow and sluggish. The animations were also appearing less fluid.

 

Is this a common observation with Hybrid Apps? I haven't modified the code at all. Any suggestions??

Thank you!! 

 

I want to automatically convert new leads into contacts. I have a trigger on Lead after update that will bulk convert 100 leads at a time. The problem I have  is that my marketing automation tool pushes new leads into Salesforce in batches of 200 at a time. When I try to import 200 leads, the bulk convert fails due to a too many DML 151 error.

 

I read that the convertlead function can only handle 100 records at a time. How can I edit the code to handle 200 imports at a time? Is it possible?

 

Thanks in advance.

 

trigger AutoConvert on Lead (after update) {

for(Lead myLead: Trigger.new){ if(Trigger.new[0].isConverted == false) { Database.LeadConvert lc = new database.LeadConvert(); lc.setLeadId(myLead.Id); lc.convertedStatus = 'Qualified'; //Database.ConvertLead(lc,true); lc.setDoNotCreateOpportunity(true); Database.LeadConvertResult lcr = Database.convertLead(lc); System.assert(lcr.isSuccess()); }}}