You need to sign in to do that
Don't have an account?

Why is meta update throwing exception?
Why the code throws "null: Must specify a deployment status for the Custom Object"?
Code:
This is simply translation from Java on http://www.salesforce.com/us/developer/docs/api_meta/index.htm
Code:
CustomObject co = new CustomObject(); String name = "MyCustomObject"; co.fullName = (name + "__c"); co.deploymentStatus = (DeploymentStatus.InDevelopment); co.description = ("Created by the Metadata API"); co.enableActivities = (true); co.label = (name + " Object"); co.pluralLabel = (co.label + "s"); co.sharingModel = (SharingModel.ReadWrite); CustomField nf = new CustomField(); nf.type = (FieldType.Text); nf.label = (co.fullName + " Name"); co.nameField = (nf); UpdateMetadata updateMetadata = new UpdateMetadata(); updateMetadata.metadata = (co); updateMetadata.currentName = co.fullName; AsyncResult[] ars = ms.update(new UpdateMetadata[] { updateMetadata });
This is simply translation from Java on http://www.salesforce.com/us/developer/docs/api_meta/index.htm
Thanks.