4

salesforce deleted objects

I know about undelete() from Enterprise API but it looks like only for records, anyway I tried it with request:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
  <soapenv:Header>
     <urn:SessionHeader>
        <urn:sessionId>
00D28000001b4nTMwpuKlz
        </urn:sessionId>
     </urn:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
     <urn:undelete>
        <urn:ids>01I28000001HT0s</urn:ids>
        <urn:ids>01I28000001aDre</urn:ids>
     </urn:undelete>
  </soapenv:Body>
</soapenv:Envelope>

and response is:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com">
  <soapenv:Header>
    <LimitInfoHeader>
      <limitInfo>
        <current>3917</current>
        <limit>15000</limit>
        <type>API REQUESTS</type>
      </limitInfo>
    </LimitInfoHeader>
  </soapenv:Header>
  <soapenv:Body>
    <undeleteResponse>
      <result>
        <errors>
          <message>Entity type is not undeletable</message>
          <statusCode>CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY</statusCode>
        </errors>
        <id>01I28000001HT0sEAG</id>
        <success>false</success>
      </result>
      <result>
        <errors>
          <message>Entity type is not undeletable</message>
          <statusCode>CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY</statusCode>
        </errors>
        <id>01I28000001aDreEAE</id>
        <success>false</success>
      </result>
    </undeleteResponse>
  </soapenv:Body>
</soapenv:Envelope>
0

1 Answer 1

2

Here are the documented CRUD-Based Calls for the Metadata API. No joy undelete.

Use the following CRUD-based calls to work with metadata components in a manner similar to how synchronous API calls in the enterprise WSDL act upon objects.

  • createMetadata()
    Adds one or more new metadata components to your organization synchronously.readMetadata() Returns one or more metadata components from your organization synchronously.

  • updateMetadata()
    Updates one or more metadata components in your organization synchronously.upsertMetadata() Creates or updates one or more metadata components in your organization synchronously.

  • deleteMetadata()
    Deletes one or more metadata components from your organization synchronously.renameMetadata() Renames a metadata component in your organization synchronously.

  • create()
    Deprecated. Adds one or more new metadata components to your organization asynchronously. This call is removed as of API version 31.0 and is available in earlier versions only. Use createMetadata()instead.

  • delete()
    Deprecated. Deletes one or more components from your organization asynchronously. This call is removed as of API version 31.0 and is available in earlier versions only. Use deleteMetadata()instead.

  • update()
    Deprecated. Updates one or more components in your organization asynchronously. This call is removed as of API version 31.0 and is available in earlier versions only. Use updateMetadata() orrenameMetadata() instead.

0

You must log in to answer this question.

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