I am trying to update the record type to move the picklist values to the 'active values' . I am using the metadata api. Below is my code where Scope_Of_Services_Tasks__c is the name of object , Meeting_Type__c is the field name and Project_Management is the name of the Record type :-
MetadataService.RecordType rt = new MetadataService.RecordType();
rt.active = true;
rt.fullName = 'Project_Management';
rt.label = 'Project Management';
MetadataService.PicklistValue pv = new MetadataService.PicklistValue();
pv.fullName = 'test123';
MetadataService.RecordTypePicklistValue ohmVersions = new MetadataService.RecordTypePicklistValue();
ohmVersions.Picklist = 'Meeting_Type__c';
ohmVersions.values = new MetadataService.PicklistValue[] { pv };
rt.PicklistValues = new MetadataService.RecordTypePicklistValue[] { ohmVersions };
return handleSaveResults(
service.updateMetadata(
new MetadataService.Metadata[] { rt })[0]);
The code is giving this error :- "Web service callout failed: WebService returned a SOAP Fault: '' is not valid for type xsd:boolean, should be '0', '1', 'true' or 'false' faultcode=soapenv:Client faultactor="
PLease help me out as this is very urgent and I am trying since more than 2 days. Thanks
Update:- pv.fullName = 'test123'; here 'test123' is the picklist value that need to be moved to the active values in the record type picklist.
pv.default_x = false;
help?