- March 20, 2018 at 2:08 pm #26299kapil #12
Is there any way to get all the fields of the sObject without using their API names?
Is there any way to get all the fields of the sObject without using their API names?March 20, 2018 at 2:14 pm #26303March 20, 2018 at 2:27 pm #26304PRANAV #1
You can use “WORKBENCH” for this. In workbench you have to first login with your salesforce credentials and then go to Queries tab and select SOQL Query. There you have option to select your object and all their fields with filter and sort functionality also.
Hope this will helps you.March 21, 2018 at 7:00 am #26311Ratnakar #10
you can use following code to get fields.
SObjectType objectType = Schema.getGlobalDescribe().get(‘objectAPIName’);
Map<String,Schema.SObjectField> mfields = objectType.getDescribe().fields.getMap();
mfields map have field names for that particular object which you will mention in objectAPIName.
I hope this help you.
Please Register to reply to this topic. /