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

How to get a number from a sobject list?
Program_Member_Stage_MVN__c stagesequence = [select Stage_Number__c from Program_Member_Stage_MVN__c where id=:PId];
how to i get Stage_Number__c from the above list to assign it to where clause in the below soql query ==here(Stage_Number__c<????)
List<Program_Member_Stage_MVN__c> Pstages=new List<Program_Member_Stage_MVN__c>([select id,Stage_Number__c,Parent_Stage__c,Status_MVN__c,Parent_Program_Member_Stage_MVN__c from Program_Member_Stage_MVN__c where Program_Member_MVN__c=:Pm.id and Parent_Stage__c='Parent_Stage_MVN' and Parent_Program_Member_Stage_MVN__c!=:PId and Stage_Number__c<????]);
how to i get Stage_Number__c from the above list to assign it to where clause in the below soql query ==here(Stage_Number__c<????)
List<Program_Member_Stage_MVN__c> Pstages=new List<Program_Member_Stage_MVN__c>([select id,Stage_Number__c,Parent_Stage__c,Status_MVN__c,Parent_Program_Member_Stage_MVN__c from Program_Member_Stage_MVN__c where Program_Member_MVN__c=:Pm.id and Parent_Stage__c='Parent_Stage_MVN' and Parent_Program_Member_Stage_MVN__c!=:PId and Stage_Number__c<????]);
Please try the below and hoping the data type of stage number is a integer or please modify as required.
Integer stagesequence = [select Stage_Number__c from Program_Member_Stage_MVN__c where id=:PId].Stage_Number__c ;
Please mark as best answer if the above helps...!!!
All Answers
Please try the below and hoping the data type of stage number is a integer or please modify as required.
Integer stagesequence = [select Stage_Number__c from Program_Member_Stage_MVN__c where id=:PId].Stage_Number__c ;
Please mark as best answer if the above helps...!!!