You need to sign in to do that
Don't have an account?
chiragmanocha
Fetching all the fields of an entity
Hi All,
I want to do "select * from Account"
But as it is not possible to use * sign in query, please let me know How can I get all the field values of Account.
Thanks and Regards
--
Chirag Manocha
You get all the Field values by asking for them.
You have to type out every Field name in your SELECT statement.
You can dynamically get this list by calling:
Field[] fields = binding.describeSObject( "Account" ).getFields();
for ( int i = 0; i < fields.length; i++ ) {
System.out.println( fields[i].getName() );
}
All Answers
You get all the Field values by asking for them.
You have to type out every Field name in your SELECT statement.
You can dynamically get this list by calling:
Field[] fields = binding.describeSObject( "Account" ).getFields();
for ( int i = 0; i < fields.length; i++ ) {
System.out.println( fields[i].getName() );
}
There are three more fields in each and every entity bean class
__equalsCalc, __hashCodeCalc, typeDesc.
Do I need to filter it or this can be done by some special method ??