Activity Forums Salesforce® Discussions Is there any query in Salesforce to fetch all the fields on the entity?

  • PRANAV

    Member
    October 5, 2016 at 6:40 am

    Hi Tanu,

    Yes , you can achieve this using the eclipse for the entire fields to make the query.

    Thanks

  • Ratan Paul

    Member
    October 6, 2016 at 9:31 am

    if you are looking for feature like sql select * from table_name then I say no. In salesforce there is no feature like that. And if you want to create a utility class where you can pass the object name and get the all field and prepare soql query with all fields then solution is use decribe call to get the all fields name.

     

    SObjectType accountType = Schema.getGlobalDescribe().get('Account');
    Map<String,Schema.SObjectField> mfields = accountType.getDescribe().fields.getMap();

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos