• Raja Sharma 7
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
I am using action: region on an input field but because of this that input field is not showing at proper position and also its label is not coming, whereas the other fields are working fine in which I am not using action region, so how can I make that field responsible and also gets its label. and also we cannot remove action: region because some functionality is based on it. 
When I use Full_Material_Name__c field (Type: Long Text ) then i got error "System.UnexpectedException: field 'Full_Material_Name__c' can not be grouped in a query call " for that code.
Apex Class:
Public Controller(){
    AggregateResult[] results = [SELECT Full_Material_Name__c, SUM(Total_Price__c) Total, SUM(Total_Unit_Price__c) Totalu, Count(Id)         Quantity FROM Order_Line_Item__c WHERE Order_ID__c =: order.Id  GROUP BY Full_Material_Name__c];
          Summaries = new List<Summary>();
      
         for(AggregateResult ar : results) {
            Summaries.add(new Summary(ar));
        }
   }   

    // wrapper class to hold aggregate data
    public class Summary {
        public Integer Quantity {get; private set; }
       //public String Name {get; private set; }
        public Integer Total {get; private set;}
        public Integer Totalu {get; private set;}
        public String FullName { get; private set; }

        public Summary(AggregateResult ar) {
            Quantity = (Integer) ar.get('Quantity');
         //   Name = (String)ar.get('Master_Material_Lookup__c');
            Total = Integer.valueOf(ar.get('Total'));
            Totalu = Integer.valueOf(ar.get('Totalu'));
            FullName = String.valueOf(ar.get('Full_Material_Name__c'));
         }
    }

when i use lookup field that code working properly when i use Text field then that gives me the following error.
 
 I want to make a chart of a custom object's   parent-child hierarchy. That part  I was done. and now i want to drag and drop nodes and change their parents in this chart.And it should have to also update in a database can anyone give some suggestions.
I have a custom object in which there is a field of the name when i select any name and save then trigger fire and send an email to a person and in that email, there are two buttons of Accept and Reject when the person replies for accept or reject (click on the accept or reject button ) then a field that is a called status having the value accept and reject should be  updated accordingly.
I am using action: region on an input field but because of this that input field is not showing at proper position and also its label is not coming, whereas the other fields are working fine in which I am not using action region, so how can I make that field responsible and also gets its label. and also we cannot remove action: region because some functionality is based on it. 
When I use Full_Material_Name__c field (Type: Long Text ) then i got error "System.UnexpectedException: field 'Full_Material_Name__c' can not be grouped in a query call " for that code.
Apex Class:
Public Controller(){
    AggregateResult[] results = [SELECT Full_Material_Name__c, SUM(Total_Price__c) Total, SUM(Total_Unit_Price__c) Totalu, Count(Id)         Quantity FROM Order_Line_Item__c WHERE Order_ID__c =: order.Id  GROUP BY Full_Material_Name__c];
          Summaries = new List<Summary>();
      
         for(AggregateResult ar : results) {
            Summaries.add(new Summary(ar));
        }
   }   

    // wrapper class to hold aggregate data
    public class Summary {
        public Integer Quantity {get; private set; }
       //public String Name {get; private set; }
        public Integer Total {get; private set;}
        public Integer Totalu {get; private set;}
        public String FullName { get; private set; }

        public Summary(AggregateResult ar) {
            Quantity = (Integer) ar.get('Quantity');
         //   Name = (String)ar.get('Master_Material_Lookup__c');
            Total = Integer.valueOf(ar.get('Total'));
            Totalu = Integer.valueOf(ar.get('Totalu'));
            FullName = String.valueOf(ar.get('Full_Material_Name__c'));
         }
    }

when i use lookup field that code working properly when i use Text field then that gives me the following error.
 
 I want to make a chart of a custom object's   parent-child hierarchy. That part  I was done. and now i want to drag and drop nodes and change their parents in this chart.And it should have to also update in a database can anyone give some suggestions.