• Joy Bing 3
  • NEWBIE
  • -5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 9
    Replies
thanks in advance

My class 

Public class  Invoice_details {
        Public List<VoiceWrapper> InvoiceList {get;set;}
        Public kognoz1__Invoice2__c InvoiceInfo { get;set;}
           Public static Date StartDate {get;set;}
        Public static Date EndDate {get;set;}
        Public static string querystr;
        Public integer counter = 0; 
        Public integer list_size=100;
        Static set<Id> ids = New set<Id>();
        
         
                Public Invoice_details() { 
                InvoiceInfo = new kognoz1__Invoice2__c();
                InvoiceList = New List<VoiceWrapper>();
                for(kognoz1__Invoice2__c k : [SELECT id, kognoz1__Invoice_Date__c, kognoz1__Account__c, Downloaded__c, kognoz1__Opportunity__r.rechnung_per_email__c , kognoz1__Opportunity__c, (select id, name from Attachments) FROM kognoz1__Invoice2__c ORDER BY kognoz1__Invoice_Date__c  DESC limit: List_size ])
                {
                    InvoiceList.add(new VoiceWrapper(K));
                }
                } 
            
                Public void display() {
                InvoiceList.clear();
                Date startDate = InvoiceInfo.kognoz1__Invoice_Date__c;
                Date endDate = InvoiceInfo.kognoz1__Invoice_Due_Date__c;
                if(InvoiceInfo.kognoz1__Invoice_Date__c != null ) {
                //string Query = 'SELECT kognoz1__Invoice_Date__c, kognoz1__Account__c, kognoz1__Opportunity__c,(select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE kognoz1__Invoice_Date__c = '+startDate+' AND kognoz1__Invoice_Date__c= '+EndDate+' ';
                InvoiceList = New List<VoiceWrapper>();
                for(kognoz1__Invoice2__c k : [SELECT Id, kognoz1__Invoice_Date__c, kognoz1__Account__c, Downloaded__c, kognoz1__Opportunity__r.rechnung_per_email__c, kognoz1__Opportunity__c, (select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE kognoz1__Invoice_Date__c >=: startDate AND kognoz1__Invoice_Date__c <=: EndDate ORDER BY kognoz1__Invoice_Date__c  DESC  limit: list_size offset: counter ])
                {
                    InvoiceList.add(new VoiceWrapper(K));
                }
                }
               }
                
   
    
                Public void emailLists() {
                InvoiceList.clear();
                Date startDate = InvoiceInfo.kognoz1__Invoice_Date__c;
                Date endDate = InvoiceInfo.kognoz1__Invoice_Due_Date__c;
                if(InvoiceInfo.kognoz1__Invoice_Date__c != null ) {
                //string Query = 'SELECT kognoz1__Invoice_Date__c, kognoz1__Account__c, kognoz1__Opportunity__c,(select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE kognoz1__Invoice_Date__c = '+startDate+' AND kognoz1__Invoice_Date__c= '+EndDate+' ';
                InvoiceList = New List<VoiceWrapper>();
                for(kognoz1__Invoice2__c k : [SELECT Id, kognoz1__Invoice_Date__c, kognoz1__Account__c, Downloaded__c, kognoz1__Opportunity__r.rechnung_per_email__c, kognoz1__Opportunity__c, (select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE kognoz1__Invoice_Date__c >=: startDate AND kognoz1__Invoice_Date__c <=: EndDate AND kognoz1__Opportunity__r.rechnung_per_email__c like '%' ORDER BY kognoz1__Invoice_Date__c  DESC  limit: list_size offset: counter ])
                {
                    InvoiceList.add(new VoiceWrapper(K));
                }
                }
               }

                Public void PostLists() {
                InvoiceList.clear();
                Date startDate = InvoiceInfo.kognoz1__Invoice_Date__c;
                Date endDate = InvoiceInfo.kognoz1__Invoice_Due_Date__c;
                if(InvoiceInfo.kognoz1__Invoice_Date__c != null ) {
                //string Query = 'SELECT kognoz1__Invoice_Date__c, kognoz1__Account__c, kognoz1__Opportunity__c,(select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE kognoz1__Invoice_Date__c = '+startDate+' AND kognoz1__Invoice_Date__c= '+EndDate+' ';
                InvoiceList = New List<VoiceWrapper>();
                for(kognoz1__Invoice2__c k : [SELECT Id, kognoz1__Invoice_Date__c, kognoz1__Account__c, Downloaded__c, kognoz1__Opportunity__r.rechnung_per_email__c, kognoz1__Opportunity__c, (select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE kognoz1__Invoice_Date__c >=: startDate AND kognoz1__Invoice_Date__c <=: EndDate AND kognoz1__Opportunity__r.rechnung_per_email__c = null ORDER BY kognoz1__Invoice_Date__c  DESC  limit: list_size offset: counter ])
                {
                    InvoiceList.add(new VoiceWrapper(K));
                }
                }
               }
    
   
    
                Public void displayDownload(){
                InvoiceList.clear();
                /*
                 * InvoiceList = New List<VoiceWrapper>();
                for(kognoz1__Invoice2__c k : [SELECT id, kognoz1__Invoice_Date__c, kognoz1__Account__c, Downloaded__c, kognoz1__Opportunity__c, (select id, name from Attachments) FROM kognoz1__Invoice2__c where Downloaded__c =true AND kognoz1__Invoice_Date__c >=: startDate AND kognoz1__Invoice_Date__c <=: EndDate ORDER BY kognoz1__Invoice_Date__c  DESC limit: List_size ])
                {
                    InvoiceList.add(new VoiceWrapper(K));
                }  
                */
                InvoiceList.clear();
                Date startDate = InvoiceInfo.kognoz1__Invoice_Date__c;
                Date endDate = InvoiceInfo.kognoz1__Invoice_Due_Date__c;
                if(InvoiceInfo.kognoz1__Invoice_Date__c != null ) {
                //string Query = 'SELECT kognoz1__Invoice_Date__c, kognoz1__Account__c, kognoz1__Opportunity__c,(select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE kognoz1__Invoice_Date__c = '+startDate+' AND kognoz1__Invoice_Date__c= '+EndDate+' ';
                InvoiceList = New List<VoiceWrapper>();
                for(kognoz1__Invoice2__c k : [SELECT Id, kognoz1__Invoice_Date__c, kognoz1__Account__c, Downloaded__c, kognoz1__Opportunity__r.rechnung_per_email__c, kognoz1__Opportunity__c, (select id, name from Attachments) FROM kognoz1__Invoice2__c WHERE Downloaded__c=false AND kognoz1__Invoice_Date__c >=: startDate AND kognoz1__Invoice_Date__c <=: EndDate ORDER BY kognoz1__Invoice_Date__c  DESC  limit: list_size offset: counter ])
                {
                    InvoiceList.add(new VoiceWrapper(K));
                }
                }
                }
    
                Public class VoiceWrapper {
                Public kognoz1__Invoice2__c KI {get;set;}
                Public boolean selected {get;set;}
                Public VoiceWrapper (kognoz1__Invoice2__c K) {
                    KI = k;
                    selected = false;
                    system.debug(KI);
                 }
                }
        
        
    
    
           Public Pagereference Previous() { 
         
           counter = counter-list_size;
           display();
           return null;
          }
    
           Public pagereference Next() {
            
           counter = counter + list_size;
           display();
           system.debug( InvoiceList);
           return null;
          }
    
        
    
     
    
    
       Public boolean getDisablePrevious() { 
            if (counter<=0) {
           return True;
         }
           else return false;
         }
    
       Public Boolean getDisableNext() {
          if (counter > = InvoiceList.size()-list_size) { 
           return true;
           }
           else return false;
        }
    
    
}




my test class


 
I am trying to run a report in Launchpad and get the abovementioned error. Does anyone know what this means?

I have a JSON string which represents a List<String>, but I can't figure out how to deserialize it - I don't know what to put for the deserialization type argument.

 

List<String> myList = (List<String>)System.JSON.deserialize(json_string, ????);

 

I've tried putting "List<String>" as the arg, but I get an error about an "unexpected token".

Please help me ,

 I create new formula field ( Data type is Number ) for calculate value from text field but system not allow me to calculate it. Do you have any suggest me ?

 

  • March 29, 2011
  • Like
  • 1