Did You Know?

You can create any type of product documentation with Docy

Salesforce SOQLLin Dynamic query where clause

Link 1 alla documentazione ufficiale

Link 2 alla documentazione ufficiale

fieldExpression1 AND (fieldExpression2 OR fieldExpression3)
(fieldExpression1 AND fieldExpression2) OR fieldExpression3


List<Object__c> records = new List<Object__c>();

     String query = 'Select Id,..... from Object__c where id!=null';
    if (!string.isEmpty(fromDate))        
          query+='and fromDate=' fromDate;
	 if (!string.isEmpty(toDate))        
	 if (statuses.size()>0)        
     records = Database.query(query);

     return records;

Related Post

Salesforce Apex re-try-catch

Integer count = 0; Integer maxTries = 3; while(true) { ...

Salesforce Apex: Best practices initial comme

E' sempre bene commentare il codice e sopratutto inizia...

Salesforce Apex Truncate String

String sizeString = 'Let\'s Imagine this is more than 1...

Leave a Comment