• rpsfdc
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi,

 

When I execute this query, I get an error '<number field> cannot be grouped by in a query call'. My query is:

 

Select SUM(Quantity) SumQuant, CustomAccountId__c, ProductCategory__c, BillingMonth__c from MyCustomObject__c where BillingYear__c = 2010 GROUP BY CustomAccountId__c, ProductCategory__c, BillingMonth__c

 

Here, BillingMonth__c and BillingYear__c are NUMBER fields (CustomAccountId__c and ProductCategory__c are reference fields).

 

Is there a documentation on which fields can and cannot be used in the GROUP BY clause? E.g.. Can I use Formula fields as one of the parameters for Group By? Should all the fields in Group by clause be indexed (or external Ids) in the Force.com Database? Can't number fields be used to group by?

 

Any help is highly appreciated.

 

Thanks,

Ruchir

  • December 13, 2010
  • Like
  • 0

Hi,

In my visualforce page, i want to rerender a table after the user inputs value in the table. The last column in this table of each row is a simple formula field that sums up the values for other fields (e.g. June volume = 100, July Volume = 200 then the last column of Total will be 300). My VF page is like this:

<apex:page standardcontroller="Annual_Supply_Plan__c" sidebar="false" extensions="annualSupplyPlanController">
 
  <apex:form >
  <apex:pageBlock title="Annual Supply Plan Objects">
 
      <apex:dataTable value="{!listASPItems}" var="listASPItem" border="1" style="height:20;float: left;" id="ASPItemstable">
          
	  <apex:column headerValue="FY'11 Initial Shipment Forecast" width="5px" footerValue="Total">
              <apex:outputField value="{!listASPItem.Product_Category__c}" style="align: center" />
          </apex:column>
          
          <apex:column headerValue="June" width="5px" footerValue="Total June">
              <apex:inputField value="{!listASPItem.June_Volume__c}"/>
          </apex:column>
          
          <apex:column headerValue="July" footerValue="Total July">
              <apex:inputField value="{!listASPItem.July_Volume__c}"/>
          </apex:column>
          
              
          <apex:column headerValue="Tons" footerValue="Total">
             <apex:outputPanel id="shipmentForecasts">
              <apex:outputField value="{!listASPItem.Total_Volume__c}"/>
             </apex:outputPanel>
          </apex:column>
      </apex:dataTable>
      
    <apex:pageBlockButtons >
        <apex:commandButton action="{!SaveForecasts}" value="Save Forecasts" reRender="shipmentForecasts, {!listASPItems}"/>
    </apex:pageBlockButtons>

    </apex:pageblock>
  </apex:form>
 
 
</apex:page>

 But after clicking Save Forecasts, the table (last column specifically) is not refreshed. Can anyone please help me?

 

My controller is very simple:

public with sharing class annualSupplyPlanController {
    
    List<ASP_Item__c> listASPItems = new List<ASP_Item__c>();
    
    List<ASP_Yearly_Forecast__c> listASPYrlyFcsts = new List<ASP_Yearly_Forecast__c>();
    
    public id idASP = System.currentPageReference().getParameters().get('id');
    
    
    
    public annualSupplyPlanController(ApexPages.StandardController controller) {
    	
    	System.debug(logginglevel.INFO, 'in CreateASPItems listASP is '+ ApexPages.currentPage().getParameters().get('id'));
        
        listASPItems = [Select a.September_Volume__c, a.Product_Category__c, a.October_Volume__c, a.November_Volume__c, a.Name, a.Month__c, 
        				a.May_Volume__c, a.March_Volume__c, a.June_Volume__c, a.July_Volume__c, a.January_Volume__c, a.Id, a.February_Volume__c, a.December_Volume__c,
        				a.Date_of_Month__c, a.August_Volume__c, a.April_Volume__c, a.Annual_Supply_Plan__c, a.Total_Volume__c From ASP_Item__c a 
        				where a.Annual_Supply_Plan__c =: idASP order by a.Product_Category__c, a.Date_of_Month__c];
        
    }
    
    public List<ASP_Item__c> getlistASPItems(){
        return listASPItems;
    }
    
	public List<ASP_Yearly_Forecast__c> getlistASPYrlyFcsts(){
		return listASPYrlyFcsts;
	}
	
	public PageReference SaveForecasts() {
            update listASPItems;
            
            return null;
      }

      public PageReference cancel() {
            return null;
      }
	

}

 Appreciate your help.

 

  • December 02, 2010
  • Like
  • 0

I just installed Adobe Air and the Force Explorer (Beta). When I try to log in using my salesforce.com login, I get the followign error message: Login Failed: INVALID_LOGIN: Invalid username, password, security token; or user locked out.

 

Does anyone else have this problem?

Hi,

Unable to fetch and save Force.com Components to Project: com.salesforce.ide.api.metadata.types.Metadata$JaxAccessorF_fullName cannot be cast to com.sun.xm.internal.bind.v2.runtime.reflect.Accessor

 

Abort or Continute Force.com project creation?

==============

while i am creating a new force.com project i got this error: can u please tell me why this error came. i downloaded eclipse and added force.com ide.... when i try to creating a new force.com project i got this error... and i am able to create a force.com project but not getting all existing classes and pages. And not added my new page or class content to the sever when i save. Is it required any other software installations?

 

Thanks

Hi,

 

Unable to fetch and save Force.com Components to Project: com.salesforce.ide.api.metadata.types.Metadata$JaxAccessorF_fullName cannot be cast to com.sun.xm.internal.bind.v2.runtime.reflect.Accessor

 

Abort or Continute Force.com project creation?

==============

while i am creating a new force.com project i got this error: can u please tell me why this error came. i downloaded eclipse and added force.com ide.... when i try to creating a new force.com project i got this error... and i am able to create a force.com project but not getting all existing classes and pages. And not added my new page or class content to the sever when i save. Is it required any other software installations?

 

I am getting the following error (repeated for multi objects) during deployment from Sandbox to Sandbox (We are deploying using Ant).:

Error: workflows/Account.workflow(414,12):This workflow rule currently has pending actions in the workflow queue. To delete, please remove those pending actions.

The thing is that those pending actions were deleted a week ago, from both environments, the first time this came up. And I also deleted the workflows from my Eclipse project, deployed succesfully, and then re-added them to the project to make sure there was nothing in Eclipse that was the issue. Definitiely seems like the "Sending" Sandbox is "remembering" that there used to be pending actions.

Any suggestions on what I can do to clear this old information out?

Hi All,

 

I am facing some problem on new RTF field feature provided on Spring 11 upgrade.

 

So I created a Text Area (Rich) field on one of our custom objects. Lets say object name is cusomtObject__c and field name is RTFTest__c,

 

I tried binding this text area field on the visual force page with input field tag. However whatever I am entering on it, while submitting the form that value doesn't get passed to the server and on the record empty string ("") gets saved as value of RTFTest__c field.

 

Does anyone have any idea why is this happening ?

 

Thanks & Regards,

Anand Agrawal.

Hi,

 

When I execute this query, I get an error '<number field> cannot be grouped by in a query call'. My query is:

 

Select SUM(Quantity) SumQuant, CustomAccountId__c, ProductCategory__c, BillingMonth__c from MyCustomObject__c where BillingYear__c = 2010 GROUP BY CustomAccountId__c, ProductCategory__c, BillingMonth__c

 

Here, BillingMonth__c and BillingYear__c are NUMBER fields (CustomAccountId__c and ProductCategory__c are reference fields).

 

Is there a documentation on which fields can and cannot be used in the GROUP BY clause? E.g.. Can I use Formula fields as one of the parameters for Group By? Should all the fields in Group by clause be indexed (or external Ids) in the Force.com Database? Can't number fields be used to group by?

 

Any help is highly appreciated.

 

Thanks,

Ruchir

  • December 13, 2010
  • Like
  • 0

Hi,

In my visualforce page, i want to rerender a table after the user inputs value in the table. The last column in this table of each row is a simple formula field that sums up the values for other fields (e.g. June volume = 100, July Volume = 200 then the last column of Total will be 300). My VF page is like this:

<apex:page standardcontroller="Annual_Supply_Plan__c" sidebar="false" extensions="annualSupplyPlanController">
 
  <apex:form >
  <apex:pageBlock title="Annual Supply Plan Objects">
 
      <apex:dataTable value="{!listASPItems}" var="listASPItem" border="1" style="height:20;float: left;" id="ASPItemstable">
          
	  <apex:column headerValue="FY'11 Initial Shipment Forecast" width="5px" footerValue="Total">
              <apex:outputField value="{!listASPItem.Product_Category__c}" style="align: center" />
          </apex:column>
          
          <apex:column headerValue="June" width="5px" footerValue="Total June">
              <apex:inputField value="{!listASPItem.June_Volume__c}"/>
          </apex:column>
          
          <apex:column headerValue="July" footerValue="Total July">
              <apex:inputField value="{!listASPItem.July_Volume__c}"/>
          </apex:column>
          
              
          <apex:column headerValue="Tons" footerValue="Total">
             <apex:outputPanel id="shipmentForecasts">
              <apex:outputField value="{!listASPItem.Total_Volume__c}"/>
             </apex:outputPanel>
          </apex:column>
      </apex:dataTable>
      
    <apex:pageBlockButtons >
        <apex:commandButton action="{!SaveForecasts}" value="Save Forecasts" reRender="shipmentForecasts, {!listASPItems}"/>
    </apex:pageBlockButtons>

    </apex:pageblock>
  </apex:form>
 
 
</apex:page>

 But after clicking Save Forecasts, the table (last column specifically) is not refreshed. Can anyone please help me?

 

My controller is very simple:

public with sharing class annualSupplyPlanController {
    
    List<ASP_Item__c> listASPItems = new List<ASP_Item__c>();
    
    List<ASP_Yearly_Forecast__c> listASPYrlyFcsts = new List<ASP_Yearly_Forecast__c>();
    
    public id idASP = System.currentPageReference().getParameters().get('id');
    
    
    
    public annualSupplyPlanController(ApexPages.StandardController controller) {
    	
    	System.debug(logginglevel.INFO, 'in CreateASPItems listASP is '+ ApexPages.currentPage().getParameters().get('id'));
        
        listASPItems = [Select a.September_Volume__c, a.Product_Category__c, a.October_Volume__c, a.November_Volume__c, a.Name, a.Month__c, 
        				a.May_Volume__c, a.March_Volume__c, a.June_Volume__c, a.July_Volume__c, a.January_Volume__c, a.Id, a.February_Volume__c, a.December_Volume__c,
        				a.Date_of_Month__c, a.August_Volume__c, a.April_Volume__c, a.Annual_Supply_Plan__c, a.Total_Volume__c From ASP_Item__c a 
        				where a.Annual_Supply_Plan__c =: idASP order by a.Product_Category__c, a.Date_of_Month__c];
        
    }
    
    public List<ASP_Item__c> getlistASPItems(){
        return listASPItems;
    }
    
	public List<ASP_Yearly_Forecast__c> getlistASPYrlyFcsts(){
		return listASPYrlyFcsts;
	}
	
	public PageReference SaveForecasts() {
            update listASPItems;
            
            return null;
      }

      public PageReference cancel() {
            return null;
      }
	

}

 Appreciate your help.

 

  • December 02, 2010
  • Like
  • 0

We're trying to use the new "Rich Text Area" Data Type in our VisualForce pages, but getting the following error:

 

"Error: Invalid field Main_Content__c for SObject CloudConversion__Portal_Content__c"

 

This is supported yet?  Is there a special trick to get it to work?

 

Thanks,

Jon 

 

 

<apex:outputText escape="false" value="{!content.Main_Content__c}"/>