function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VIGNESH SETHURAMALINGAM 7VIGNESH SETHURAMALINGAM 7 

ReadMetadata method Metadata API provides result with only 10 records

I have used the below code to fetch Details of the recordType(which i have passed as argument).but  I am able to fetch only 10 records of RecordTypePicklistValue in RecordType class. 

i.e The readresult class will provide Record type details in which i am able to fetch only 10 picklist fields of the record type.



MetadataService.MetadataPort service = createService();
service.timeout_x = 120000;
metadataService.ReadResult  objreadResult = service.readMetadata('RecordType',lstRecordTypes);

Please help me with this.

Thank you in advance.
Hargobind_SinghHargobind_Singh
https://www.salesforce.com/us/developer/docs/api_meta/

D
ocumentation for readMetaData states a limit of 10 on the supplied array of names. 

fullNames string[] Array of full names of the components to read.

Limit: 10.

You must submit arrays of only one type of component. For example, you can submit an array of 10 custom objects or 10 profiles, but not a mix of both types.
VIGNESH SETHURAMALINGAM 7VIGNESH SETHURAMALINGAM 7
Hi Hargobind,

Thank you so much for replying me ..

Actually my issue was, I was passing only 10 Record type's Full name(which is contained in an list called lstRecordTypes) in the Read Metadata method.  

i was also able to fetch those Record Types details. But it gives me only details of 10 picklist associated with  a record type.

In Detail the Metadata WSDL contains contains an class Record Type 

public class RecordType extends Metadata {
        public String type = 'RecordType';
        public String fullName;
        public Boolean active;
        public String businessProcess;
        public String compactLayoutAssignment;
        public String description;
        public String label;
        public MetadataService.RecordTypePicklistValue[] picklistValues;
        private String[] active_type_info = new String[]{'active','http://soap.sforce.com/2006/04/metadata',null,'1','1','false'};
        private String[] businessProcess_type_info = new String[]{'businessProcess','http://soap.sforce.com/2006/04/metadata',null,'0','1','false'};
        private String[] compactLayoutAssignment_type_info = new String[]{'compactLayoutAssignment','http://soap.sforce.com/2006/04/metadata',null,'0','1','false'};
        private String[] description_type_info = new String[]{'description','http://soap.sforce.com/2006/04/metadata',null,'0','1','false'};
        private String[] label_type_info = new String[]{'label','http://soap.sforce.com/2006/04/metadata',null,'1','1','false'};
        private String[] picklistValues_type_info = new String[]{'picklistValues','http://soap.sforce.com/2006/04/metadata',null,'0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://soap.sforce.com/2006/04/metadata','true','false'};
        private String[] type_att_info = new String[]{'xsi:type'};
        private String[] fullName_type_info = new String[]{'fullName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] field_order_type_info = new String[]{'fullName', 'active','businessProcess','compactLayoutAssignment','description','label','picklistValues'};
    }



The above class will be returned as response in Readresult object which the highlighted line variable Picklistvalues contains all the details of the picklist related to the record type. But In my case i collection MetadataService.RecordTypePicklistValue[] picklistValues is holding only 10 values.

Please Help me with this.