forrest icon indicating copy to clipboard operation
forrest copied to clipboard

Custom and Managed Fields not showing

Open hoersten opened this issue 3 years ago • 2 comments

We have some custom fields and managed fields on the OpportunityLineItem SF object. From the SF Developer Console I can run select Id, ia_crm__Class__c from OpportunityLineItem where Id = '00k4W00001Nc0jh' and get results. If I run Forrest::query("select Id, ia_crm__Class__c from OpportunityLineItem where Id = '00k4W00001Nc0jh'") I get an error message: No such column 'ia_crm__Class__c' on entity 'OpportunityLineItem'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. ia_crm__Class__c is a reference field added via a managed package.

hoersten avatar Feb 17 '22 22:02 hoersten

I would check field level security. It's possible the profile logged in with forrest does not have read/edit access to the field you are trying to query.

omniphx avatar Feb 18 '22 05:02 omniphx

Thanks, that helped show some of the other fields, but this one is still missing. It's a reference field if that makes a difference.

hoersten avatar Feb 18 '22 22:02 hoersten

One other thing I would try is to use the tooling API to retrieve field information: https://github.com/omniphx/forrest/issues/246#issuecomment-588604219

omniphx avatar Feb 26 '23 22:02 omniphx