• Varun Yagain
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 9
    Replies

Hi ,

 

I have some doubts .

I have some data which contains %complete and status [complete or incomplete] as both fields.

I created custom class and add this these 2 fields in this class.

Then I created 2 objects of this class and assign values and then added these 2 objects in custom list.

Then I want to loop out the list and create pie chart and display it in different row.

 

I am able to do it  , but here  2 charts are coming in only one row and this is not expected , I want each row contains only one pie chart.

 

Below is code snippet for controller:

 

public class TestGraph
{
    Public List<PieWedgeData> getData{get;set;}
    Public List<Show> s{get;set;}
    Public List<PieWedgeData> getData1{get;set;}
   
    
    public TestGraph()
    {
        getData = new List<PieWedgeData>();
        
        PieWedgeData obj = new PieWedgeData('complete',40);
        PieWedgeData obj1 = new PieWedgeData('incomplete',60);
        getData.add(obj);
        getData.add(obj1);
       
       
        Show objs = new Show();
        objs.displayname = 'public site 1';
        objs.placedata = getData;
       
         s=new  List<Show> ();
        s.add(objs);
      
        
        
        getData1 = new List<PieWedgeData>();
        
        PieWedgeData obj3 = new PieWedgeData('complete',10);
        PieWedgeData obj2 = new PieWedgeData('incomplete',90);
        getData1.add(obj3);
        getData1.add(obj2);
       
       
        Show objs1 = new Show();
        objs1.displayname = 'public site 2';
        objs1.placedata = getData1;
       
       
      
        s.add(objs1);
    }
    
    public class PieWedgeData
    {
        public String name { get; set; }
        public Decimal data { get; set; }
        public PieWedgeData(String name, Decimal data)
        {
            this.name = name;
            this.data = data;
        }
    }
    
    public class Show
    {
       public String displayname {get;set;}
       public List<PieWedgeData> placedata {get;set;}
    }
}

 

below is visualforce code :

 

<apex:page controller="TestGraph">
 
  <apex:PageBlock >
 
              <apex:pageBlockTable value="{!s}" var="wrap" align="CENTER">
                  <apex:column headerValue="Name" value="{!wrap.displayname}"/>
                  <apex:column headerValue="% Complete">
                  <apex:chart height="200" width="300" data="{!wrap.placedata}" >
                    <apex:pieSeries dataField="data" labelField="name" showInLegend="true" highlight="true"/>
                </apex:chart>
                </apex:column>
              </apex:pageBlockTable>
 
  </apex:PageBlock>       
 
</apex:page>

 

but in output of above result both charts are displaying in first row means in  public site 1 row 

where as per expectation  second chart should come in another row means in public site 2 .

 

 

 

 anyone please help me to resolve this issue.

Hello forum members!

 

Has anyone else had to encounter this problem? The complete error message reads - 

 

"An unexpected error occurred when uploading your package. Please contact Salesforce Support and provide the following error code: 955073595-4200 (-1825188648)"

 

I've created a case in SFDC support but I haven't had much success over there yet. 

 

Any help is greatly appreciated!

 

- Varun.

While renaming the standard lables work in the SFDC environment, the same change is not reflected in the Visualforce pages that are part of a customer portal. I can't find documentation saying anything about this. Anyone has a clue?

 

Thanks,

Varun.

With our application developed on the Force.com platform, we have a need to modify the current time as returned by System.Now() in order to simulate scenarious at various epochs. 

 

Could someone point me to related documentation/help/discussion if there anyway to achieve that?

 

Thanks in advance,

Varun.

Hello Every One,

 

I am thinking to resolve one mystery in Apex which I don't know why it is happening like that.Please consider two sample code . I am getting total number of script statement equal to 101 in both piece of code .For first one it makes sense to me but not sure why it is giving 101 in second sample code.

 

Sample 1

-------------------

for(Integer i=0 ;i < 100 ;i++){


}

 

Sample 2 

---------------

for(Integer i=0 ;i < 100 ;i++){


    System.debug('My name is Jaffer');
}

 

 

Please share your thoughts.

 

Thanks

Jaffer

Hi Guys,

 

i am currently on a trigger for a rollup summary.

I´ve 2 Objects

Invoice= Parent

Product= Child

 

This is the Code what i actually have

 

trigger ProductRollup on Product__c (after delete, after insert, after update) {
 
    Set<id> InvoiceIds = new Set<id>();
    List<Invoice__c> InvoicesToUpdate = new List<Invoice__c>();
 
    for (Product__c item : Trigger.new)
        InvoiceIds.add(item.Invoice__c);
 
    if (Trigger.isUpdate || Trigger.isDelete) {
        for (Product__c item : Trigger.old)
            InvoiceIds.add(item.Invoice__c);
    }

    Map<id,Invoice__c> InvoiceMap = new Map<id,Invoice__c>([select id, test__c from Invoice__c where id IN :InvoiceIds]);

    for (Invoice__c Inv : [select Id, Name, test__c,(select id from Product__r) from Invoice__c where Id IN :InvoiceIds]) {
        InvoiceMap.get(Inv.Id).test__c = Inv.Product__r.size();
        InvoicesToUpdate.add(InvoiceMap.get(Inv.Id));
    }
 
    update InvoicesToUpdate;
 
}

 

i have an error in line 18 with (select id from Product__r)

Didn't understand relationship 'Product__r' in FROM part of query call

 

I just copied the trigger and adjusted it to my objects.

Can anyone help me with that code?

I am fairly new to apex and any help is appreciated.

 

BR

Tarek

  • June 24, 2013
  • Like
  • 0

Hi ,

 

I have some doubts .

I have some data which contains %complete and status [complete or incomplete] as both fields.

I created custom class and add this these 2 fields in this class.

Then I created 2 objects of this class and assign values and then added these 2 objects in custom list.

Then I want to loop out the list and create pie chart and display it in different row.

 

I am able to do it  , but here  2 charts are coming in only one row and this is not expected , I want each row contains only one pie chart.

 

Below is code snippet for controller:

 

public class TestGraph
{
    Public List<PieWedgeData> getData{get;set;}
    Public List<Show> s{get;set;}
    Public List<PieWedgeData> getData1{get;set;}
   
    
    public TestGraph()
    {
        getData = new List<PieWedgeData>();
        
        PieWedgeData obj = new PieWedgeData('complete',40);
        PieWedgeData obj1 = new PieWedgeData('incomplete',60);
        getData.add(obj);
        getData.add(obj1);
       
       
        Show objs = new Show();
        objs.displayname = 'public site 1';
        objs.placedata = getData;
       
         s=new  List<Show> ();
        s.add(objs);
      
        
        
        getData1 = new List<PieWedgeData>();
        
        PieWedgeData obj3 = new PieWedgeData('complete',10);
        PieWedgeData obj2 = new PieWedgeData('incomplete',90);
        getData1.add(obj3);
        getData1.add(obj2);
       
       
        Show objs1 = new Show();
        objs1.displayname = 'public site 2';
        objs1.placedata = getData1;
       
       
      
        s.add(objs1);
    }
    
    public class PieWedgeData
    {
        public String name { get; set; }
        public Decimal data { get; set; }
        public PieWedgeData(String name, Decimal data)
        {
            this.name = name;
            this.data = data;
        }
    }
    
    public class Show
    {
       public String displayname {get;set;}
       public List<PieWedgeData> placedata {get;set;}
    }
}

 

below is visualforce code :

 

<apex:page controller="TestGraph">
 
  <apex:PageBlock >
 
              <apex:pageBlockTable value="{!s}" var="wrap" align="CENTER">
                  <apex:column headerValue="Name" value="{!wrap.displayname}"/>
                  <apex:column headerValue="% Complete">
                  <apex:chart height="200" width="300" data="{!wrap.placedata}" >
                    <apex:pieSeries dataField="data" labelField="name" showInLegend="true" highlight="true"/>
                </apex:chart>
                </apex:column>
              </apex:pageBlockTable>
 
  </apex:PageBlock>       
 
</apex:page>

 

but in output of above result both charts are displaying in first row means in  public site 1 row 

where as per expectation  second chart should come in another row means in public site 2 .

 

 

 

 anyone please help me to resolve this issue.

I have a table where I have accounts which are scrollable.

In account, I have co-owner field where I populated all userid  that are calling same account.

Now I need to calculate who else calledby for same account and need to populate in call by other terr link in image.

How can I get for each account when page loads.

Please let me know If any further clarification needed.

Thanks in advance.

 

 

 I couldnt able to attach image in this message which can illustrate well.  :(

 

Could any one tell how can I add image for sending a message to boards

 

 

 

Hi

 

The following seems to be a common problem with Force.com IDE, pertaining to Save Errors:

 

Save error: Unable to perform save on all files: com.salesforce.ide.api.metadata.types.Metadata$Jax​bAccessorF_fullName cannot be cast to com.sun.xml.internal.bind.v2.runtime.reflect.Acces​sor    **** line 1    Force.com save problem

 

There was a similar discussion about this issue 09/2011:

http://forums.sforce.com/t5/General-Development/Eclipse-Force-com-IDE-Save-Errors/td-p/332947

 

A community member had a solution and I am wondering if it is still up-to-date:

 

"Okay I got to the bottom of it. Solution:

- Use JRE v6 update 27 - 64bit (downgraded from JRE 7)

- Use JDK v6 update 27 - 64 bit (downgraded from JDK 7)

- Re-installed Eclipse SDK 3.6.2

 

 In short, downgrading solved the problem.'

 

I am install in Windows 7 64-bit

 

Thanks

 

Jeff in Seattle

With our application developed on the Force.com platform, we have a need to modify the current time as returned by System.Now() in order to simulate scenarious at various epochs. 

 

Could someone point me to related documentation/help/discussion if there anyway to achieve that?

 

Thanks in advance,

Varun.

Is it possible to override standard field labels and make standard fields not required on page layouts?  For example, can the Opportunity Close Date field label be modified and not required?

 

Thanks.