You need to sign in to do that
Don't have an account?

Unable to make string, the value retrieved from SOQL Query
Hi All,
Please help me, here i am facing one problem, i have retrieved Source_Code__c from my Custom object by descending Order.
I have to trim first five chanrecters and convert that value to number , below SOQL query is working but Iam facing problem with Converting and trimming. could anyone please help me.
Thanks Advance!!!!
Please help me, here i am facing one problem, i have retrieved Source_Code__c from my Custom object by descending Order.
I have to trim first five chanrecters and convert that value to number , below SOQL query is working but Iam facing problem with Converting and trimming. could anyone please help me.
List<METADATA_Source__c> Sr=[SELECT id,SOURCE_CODE__c from METADATA_Source__c where SOURCE_CODE__c like 'CGI%' ORDER BY SOURCE_CODE__c DESC ]; String S= Sr; // I stucked here String S1=S.Substring(5,S.length()); Integer i= integer.valueOf(S1); //Integer j=i+1;
Thanks Advance!!!!
Could you please share the error you are getting. As I see your code
String S= Sr this should be chaged to As Sr is list of METADATA_Source__c so you can not assign it to String.