Expected duration: less than 1 week I need an Apex class (and unit tests). I want to be able to execute a method on the class from the Developer Console to copy custom Lead fields to a custom object called Request__c.
You must utilise this wrapper class for the Salesforce metadata api - https://github.com/financialforcedev/apex-mdapi.
The class method should –
1. Read all the custom fields on the Lead object and add identical fields on a custom object called Request__c. 2. If a field with the same api name already exists on Request__c it should skip and not fail/error 3. Work for the following field types: - Checkbox, Currency, Date, Date/Time, Email, Number, Percent, Phone, Picklist, Picklist (Multi-Select), Text, Text Area, Text Area (Long), Text Area (Rich), URL 4. Create numeric or currency fields with the same precision/decimal places 5. Create text/long text fields with the same length 6. Should copy the required/not required property 7. Create picklists with the same values and api names (which may be different) 7. Create picklists with the same restricted/unrestricted property 9. Set field access to visible for all custom profiles and System Administrator 10. Include unit tests with appropriate coverage for deployment
I have a Developer org with some test fields setup on the Lead and you will have access to this.