To retrieve information about fields for a given object type (opportunities, contacts, accounts) I hit this endpoint:

https://na24.salesforce.com/services/data/v35.0/sobjects/{OBJECT-TYPE}/describe

When I attempt to retrieve a description of all fields for Opportunity and Contact, Salesforce reliably returns all fields. But when I try to retrieve fields for Accounts, the API will intermittently return just null.

I have tried on a number of different versions of the API. The request seems to arbitrarily fail for Accounts only, independent of API version. Has anyone else run into this issue? Is there another way to retrieve all fields for an Account?

EDIT:

I'm interacting directly with the API here for an iOS application (Objective-C below). I've made sure that the URI is properly formed (object type properly inserted)

        NSString *objectName = [manager _salesforceObjectNameForType:objectType];

    NSString *uri = [NSString stringWithFormat:@"%@/services/data/v35.0/sobjects/%@/describe", manager.instanceURI, objectName ];

    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: uri ] ];
    [request setTimeoutInterval:30];
    [request setHTTPMethod:@"GET"];
    [request setValue:[NSString stringWithFormat:@"Bearer %@", manager.token] forHTTPHeaderField:@"Authorization"];
  • do you get the same experience on your sandbox? – cropredy Nov 17 '15 at 1:09
  • can you post some code? are you checking the returned status code? – superfell Nov 17 '15 at 4:59

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.