You need to sign in to do that
Don't have an account?
DEV_CG
unable to fetch Sobject name...( Account/contact /lead ) etc
List<Sobject> sObj = Database.Query('select id from Account');
system.debug(sObj.get('Name'));
i referred this link :https://developer.salesforce.com/forums/?id=906F00000008qYUIAY
am unable to fetch the name of sObject...and am getting below error
Method does not exist or incorrect signature: void get(String) from the type List<SObject>
ireferred the one of the link of our forum,but its not working for me...could anyone help me
please refer below link
system.debug(sObj.get('Name'));
i referred this link :https://developer.salesforce.com/forums/?id=906F00000008qYUIAY
am unable to fetch the name of sObject...and am getting below error
Method does not exist or incorrect signature: void get(String) from the type List<SObject>
ireferred the one of the link of our forum,but its not working for me...could anyone help me
please refer below link
In this since you are referrring the Name (Field Name) which will give you the value of the Record no the Value of the SObject but you have not mention the Field Name in the SOQL. So alter your SOQL Like this
If you wanted to find for the entir list then use this
I hope this will calrifies