soql

salesforce SOQL : query to fetch all the fields on the entity

て烟熏妆下的殇ゞ 提交于 2019-11-29 05:40:00
I was going through the SOQL documentation , but couldn't find query to fetch all the field data of an entity say , Account , like select * from Account [ SQL syntax ] Is there a syntax like the above in SOQL to fetch all the data of account , or the only way is to list all the fields ( though there are lot of fields to be queried ) You have to specify the fields, if you want to build something dynamic the describeSObject call returns the metadata about all the fields for an object, so you can build the query from that. Adam Create a map like this: Map<String, Schema.SObjectField> fldObjMap =