I am trying to create a custom field for an existing entity like account with v48 of the Metadata api My code is:
MetadataService.CustomField customField = new MetadataService.CustomField();
customField.fullName = "Contact.TestField__c";
customField.label = "Test Field";
customField.type = FieldType.Text;
Metadata[] metadata = new Metadata[] { customField };
createMetadataResponse response = client.createMetadataAsync(sessionHeader, null, null, metadata).Result;
in my response I get a FIELD_INTEGRITY_EXCEPTION with the message "Could not resolve standard field's name." What have I done wrong here? Do I have to add a reference to the entity the field belongs to somewhere?