function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Public List<Account> myAccList{set;get;} myAccList = [select id from account]; Integer sizeOfList = myAccList.size();
<apex:variable value="{!myAccList.size}" var="t"/>
Method name :- size()(Returns the number of elements in the list)Signature:- public Integer size()Return Value Type:- Integer
Example:-
List<Integer> myList = new List<Integer>(); Integer size = myList.size(); system.assertEquals(0, size); List<Integer> myList2 = new Integer[6]; Integer size2 = myList2.size(); system.assertEquals(6, size2);
List<Account> AccList=new List<Account>(); AccList.size(); AccList=[select id from Account Limit 5]; System.debug('AccList---->'+AccList.Size());
In class you can get the size of list by below code.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_list.htm
And in VFP
-Thanks
Ashlekh Gera
Method name :- size()
(Returns the number of elements in the list)
Signature:- public Integer size()
Return Value Type:- Integer
Example:-
There is a standard function/method for getting the size of list(size())
Example:
Thanks And Regards ,
Suraj Tripathi.