5

I am trying to make a describe call to CustomObject however I get no response back. The URL for the call is:

Note : I am describing entity "CustomObject" (Similar to CustomTabs) - it is not a Salesforce Custom Object. To get the list of all Salesforce Custom Objects.

URL : /services/data/v33.0/tooling/sobjects/CustomObject/describe

[ { "errorCode" : "NOT_FOUND", "message" : "The requested resource does not exist" } ]

I am assuming this is a permission issue, But not sure which permission. Any help on this would be much appreciated.

Thanks

5
  • Curious about, what do want to know about custom object by describing it? Describing Sobject or fields makes more sense.
    – Ashwani
    Commented Aug 21, 2015 at 8:17
  • How did you establish the Salesforce SessionID for the Authorization header? E.g. did you use OAuth and a specific grant_type? Commented Aug 21, 2015 at 9:43
  • @Ashwani I need those ObjectID's and their subsequent field-Ids to autopopulate this fields in layouts..
    – Kiba
    Commented Aug 21, 2015 at 9:54
  • @DanielBallinger Yes every thing seems to be alright..
    – Kiba
    Commented Aug 21, 2015 at 9:54
  • @MarkBenny updated my answer
    – Ashwani
    Commented Aug 21, 2015 at 10:07

2 Answers 2

3

I have figured it out. The User needs to have "View All" permissions. Only then the CustomObject describe works..

Thank you all for your support..

Cheers

1
  • View All on what object?
    – Shanerk
    Commented Apr 29, 2021 at 21:13
0

Make sure you have admin previllige and correct endpoint as:

https://instance.salesforce.com/services/data/v33.0/tooling/sobjects/CustomObject/describe

OR

https://instance.salesforce.com/services/data/v33.0/tooling/sobjects/CustomObject

It results:

{   "actionOverrides": [],   "activateable": false,   "childRelationships": [],   "compactLayoutable": false,   "createable": false,   "custom": false,   "customSetting": false,   "deletable": false,   "deprecatedAndHidden": false,   "feedEnabled": false,   "fields": [
    {
      "autoNumber": false,
      "byteLength": 18,
      "calculated": false,
      "calculatedFormula": null,
      "cascadeDelete": false,
      "caseSensitive": false,
      "controllerName": null,
      "createable": false,
      "custom": false,
      "defaultValue": null,
      "defaultValueFormula": null,
      "defaultedOnCreate": true,
      "dependentPicklist": false,
      "deprecatedAndHidden": false,
      "digits": 0,
      "displayLocationInDecimal": false,
      "encrypted": false,
      "externalId": false,
      "extraTypeInfo": null,
      "filterable": true,
      "filteredLookupInfo": null,
      "groupable": true,
      "htmlFormatted": false,
      "idLookup": true,
      "inlineHelpText": null,
      "label": "Custom Object Definition ID",
      "length": 18,
      "mask": null,
      "maskType": null,
      "name": "Id",
      "nameField": false,
      "namePointing": false,
      "nillable": false,
      "permissionable": false,
      "picklistValues": [],
      "precision": 0,
      "queryByDistance": false,
      "referenceTargetField": null,
      "referenceTo": [],
      "relationshipName": null,
      "relationshipOrder": null,
      "restrictedDelete": false,
      "restrictedPicklist": false,
      "scale": 0,
      "soapType": "tns:ID",
      "sortable": true,
      "type": "id",
      "unique": false,
      "updateable": false,
      "writeRequiresMasterRead": false
    },
    {
      "autoNumber": false,
      "byteLength": 120,
      "calculated": false,
      "calculatedFormula": null,
      "cascadeDelete": false,
      "caseSensitive": false,
      "controllerName": null,
      "createable": false,
      "name": "DeveloperName",
      "nameField": true,
      "namePointing": false,
      "nillable": false,
      "permissionable": false,
      "picklistValues": [],
      "precision": 0,
      "queryByDistance": false,
      "referenceTargetField": null,
      "referenceTo": [],
      "relationshipName": null,
      "relationshipOrder": null,
      "restrictedDelete": false,
      "restrictedPicklist": false,
      ....
      ....

      "precision": 0,
      "queryByDistance": false,
      "referenceTargetField": null,
      "referenceTo": [],
      "relationshipName": null,
      "relationshipOrder": null,
      "restrictedDelete": false,
      "restrictedPicklist": false,
      "scale": 0,
      "soapType": "xsd:dateTime",
      "sortable": true,
      "type": "datetime",
      "unique": false,
      "updateable": false,
      "writeRequiresMasterRead": false
    },
    {
      "autoNumber": false,
      "byteLength": 0,
      "calculated": false,
      "calculatedFormula": null,
      "cascadeDelete": false,
      "caseSensitive": false,
      "controllerName": null,
      "createable": false,
      "custom": false,
      "defaultValue": null,
      "defaultValueFormula": null,
      "defaultedOnCreate": true,
      "dependentPicklist": false,
      "deprecatedAndHidden": false,
      "digits": 0,
      "displayLocationInDecimal": false,
      "encrypted": false,
      "externalId": false,
      "extraTypeInfo": null,
      "filterable": true,
      "filteredLookupInfo": null,
      "groupable": false,
      "htmlFormatted": false,
      "idLookup": false,
      "inlineHelpText": null,
      "label": "Last Modified Date",
      "length": 0,
      "mask": null,
      "maskType": null,
      "name": "LastModifiedDate",
      "nameField": false,
      "namePointing": false,
      "nillable": false,
      "permissionable": false,
      "picklistValues": [],
      "precision": 0,
      "queryByDistance": false,
      "referenceTargetField": null,
      "referenceTo": [],
      "relationshipName": null,
      "relationshipOrder": null,
      "restrictedDelete": false,
      "restrictedPicklist": false,
      "scale": 0,
      "soapType": "xsd:dateTime",
      "sortable": true,
      "type": "datetime",
      "unique": false,
      "updateable": false,
      "writeRequiresMasterRead": false
    }   ],   "keyPrefix": "01I",   "label": "Custom Object Definition",   "labelPlural": "Custom Object Definitions",   "layoutable": false,   "listviewable": null,   "lookupLayoutable": null,   "mergeable": false,   "name": "CustomObject",   "namedLayoutInfos": [],   "queryable": true,   "recordTypeInfos": [],  "replicateable": false,   "retrieveable": true,   "searchLayoutable": false,   "searchable": true,   "triggerable": false,   "undeletable": false,   "updateable": false,   "urls": {
    "sobject": "/services/data/v32.0/tooling/sobjects/CustomObject",
    "describe": "/services/data/v32.0/tooling/sobjects/CustomObject/describe",
    "rowTemplate": "/services/data/v32.0/tooling/sobjects/CustomObject/{ID}"   } }

Custom fields can be queried as:

https://instance.salesforce.com/services/data/v32.0/tooling/query/?q=SELECT id, TableEnumOrId From CustomField WHERE TableEnumOrId='01I28000000FCNNEA4'

TableEnumOrId is the Id of Custom Object

2
  • The endpoint is correct but I don't have admin access. I need to know which permissions are required for this describe to work.
    – Kiba
    Commented Aug 21, 2015 at 9:50
  • 1
    I need to know the same thing, which permissions are needed? the tooling api dev guide doesn't seem to say
    – flor
    Commented Nov 15, 2016 at 4:25

You must log in to answer this question.

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