3

With the help of Metadata API we can fetch CustomObject definition easily. But somehow we need only CustomObject details not its custom fields, ListView etc.

I looked in available metadata type but unable to find anything which can help in achieving this.

Is there any method by which we can retrieve CustomObject details only. We only want to deploy custom object not its fields, Web links etc.

Any help will be appreciated.

1 Answer 1

1

According to the documentation, you can include specific fields you want to retrieve but it does not appear that you can exclude fields from being retrieved with the custom object.

However, an easy way to accomplish this, and to me even easier than trying to tinker with the api calls. Is to do some xml parsing in the language of your choice, and just pull the custom field nodes out of each of the custom object definitions.

Using that method, you can sidestep dealing with the api and just deal directly with the files, and even if the api changes, you know that your script will still remove fields.

--KC

2
  • Thanks for quick response. But we are doing file-based operation so we do not want xml parsing etc.
    – Ashwani
    Sep 5, 2014 at 14:12
  • 1
    Unfortunately, when requesting the object you by default get the listviews, actions, custom fields etc. It's not possible to get less than that.
    – kcshafer
    Sep 5, 2014 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .