{"action":"closed","issue":{"url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/71","labels_url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/71/comments","events_url":"https://api.github.com/repos/financialforcedev/apex-mdapi/issues/71/events","html_url":"https://github.com/financialforcedev/apex-mdapi/issues/71","id":55978825,"number":71,"title":"Creating a boolean field","user":{"login":"david-berman","id":6333771,"avatar_url":"https://avatars.githubusercontent.com/u/6333771?v=3","gravatar_id":"","url":"https://api.github.com/users/david-berman","html_url":"https://github.com/david-berman","followers_url":"https://api.github.com/users/david-berman/followers","following_url":"https://api.github.com/users/david-berman/following{/other_user}","gists_url":"https://api.github.com/users/david-berman/gists{/gist_id}","starred_url":"https://api.github.com/users/david-berman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-berman/subscriptions","organizations_url":"https://api.github.com/users/david-berman/orgs","repos_url":"https://api.github.com/users/david-berman/repos","events_url":"https://api.github.com/users/david-berman/events{/privacy}","received_events_url":"https://api.github.com/users/david-berman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-30T00:33:34Z","updated_at":"2015-01-30T00:49:27Z","closed_at":"2015-01-30T00:49:27Z","body":"Hello Andrew\r\n\r\nFirst of all thanks for all this work you've put together. It makes my life so much easier.  I tweaked the MetaDataServiceExamples class to help me with some admin functions (deleting fields, adding fields).  I can add text fields with no issue, but when trying to add a boolean field, I get an error that 'Boolean' is an incorrect enum type.\r\n\r\nI call this (and other methods) from the Developer Console via e.g.\r\nMetaDataServiceExamples.createFieldTypeBoolean('Case', 'Test Boolean', 'Test_Boolean__c');\r\n\r\n\r\nHere's my helper class:\r\npublic static void createFieldTypeBoolean(String strObject, String sLabel, String sAPI)\r\n    {\r\n        MetadataService.MetadataPort service = createService();    \r\n        MetadataService.CustomField customField = new MetadataService.CustomField();\r\n        customField.fullName = strObject + '.' + sAPI;\r\n        customField.label = sLabel;\r\n        customField.type_x = 'Boolean';\r\n        \r\n        List<MetadataService.SaveResult> results =     \r\n            service.createMetadata(\r\n                new MetadataService.Metadata[] { customField });               \r\n        handleSaveResults(results[0]);\r\n    }\r\n\r\nI hope you can help.\r\nThanks,\r\nDavid"}}