prisoner_of_azkaban
prisoner_of_azkaban

Reputation: 758

Error while trying to update salesforce metadata by jsforce

I am trying to fetch a metadata and update some part and then push this new metadata to salesforce using node.js and jsforce. I am successfully able to fetch the metadata but while updating I am getting this error:

{ [soapenv:Client: Element {http://soap.sforce.com/2006/04/metadata}articleTypeChannelDisplay invalid at this location in type CustomField] name: 'soapenv:Client', errorCode: 'soapenv:Client' }

This is my code:

conn.metadata.update('CustomField', metadata, function(err, results) {
  if (err) {
    console.log(err)
    return reject(err)
  } else {
    console.log(results)
  }
});

Reference: https://jsforce.github.io/document/#read-metadata

Upvotes: 0

Views: 414

Answers (1)

prisoner_of_azkaban
prisoner_of_azkaban

Reputation: 758

Replacing CustomField with CustomObject solved this issue. For details kindly read the documentation.

Upvotes: 1

Related Questions