Skip to main content
deleted 26 characters in body
Source Link
Adrian Larson
  • 152.6k
  • 38
  • 250
  • 434

In SOQL, I am only getting field which are not blank. I want record with the fields of object irrespective of they are null or not. Please refer to below code  :

 @AuraEnabled public static sObject OnloadTab(String id1){ ProjectObject__c p = [select id,f1__c,f2__c,f3__c from ProjectObject__c where id= :id.valueOf(id1) limit 1]; system.debug('Record : '+p); return p; } 

result :

 ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG} 

where as I want

ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG,f2='',f3=''} 

Thank You in advance.

In SOQL, I am only getting field which are not blank. I want record with the fields of object irrespective of they are null or not. Please refer to below code  :

 @AuraEnabled public static sObject OnloadTab(String id1){ ProjectObject__c p = [select id,f1__c,f2__c,f3__c from ProjectObject__c where id= :id.valueOf(id1) limit 1]; system.debug('Record : '+p); return p; } 

result :

 ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG} 

where as I want

ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG,f2='',f3=''} 

Thank You in advance.

In SOQL, I am only getting field which are not blank. I want record with the fields of object irrespective of they are null or not. Please refer to below code:

 @AuraEnabled public static sObject OnloadTab(String id1){ ProjectObject__c p = [select id,f1__c,f2__c,f3__c from ProjectObject__c where id= :id.valueOf(id1) limit 1]; system.debug('Record : '+p); return p; } 

result :

 ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG} 

where as I want

ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG,f2='',f3=''} 
Source Link

issue with SOQl query

In SOQL, I am only getting field which are not blank. I want record with the fields of object irrespective of they are null or not. Please refer to below code :

 @AuraEnabled public static sObject OnloadTab(String id1){ ProjectObject__c p = [select id,f1__c,f2__c,f3__c from ProjectObject__c where id= :id.valueOf(id1) limit 1]; system.debug('Record : '+p); return p; } 

result :

 ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG} 

where as I want

ProjectObject__c :{Id=a094C000000HPDBQA4, f1=01250000000ECl4AAG,f2='',f3=''} 

Thank You in advance.