function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arek S.Arek S. 

Unable to access lookup/Id fields via REST

I have an application that accesses a few SalesForce objects via the REST API, however, I don't seem to be able to retrieve or set any fields that are lookup fields.  For example, I have a Form__c object that has a Campaign lookup field as well as a Record Type field.  If I run the following query via REST:

 

SELECT Id, Campaign__c FROM Form__c

 

I receive an error stating that there is no column called Campaign__c.

 

Likewise if I try creating a new Form__c object and I set the RecordTypeId field to a specific record type ID, that value is never actually saved in SalesForce.

 

Is this a limitation of the REST API?  Is it unable to work with lookup fields?  Or am I doing something wrong?

Any help is highly appreciated.

Mohith Kumar ShrivastavaMohith Kumar Shrivastava

Definately something wrong .REST does support the access of lookup fields .Please post more info on this like exact object data model.I will look over it and help you

BinayakBinayak

Does the API user has read permission of the Campaign?