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
Strat123Strat123 

Ajax help- aultcode:'sf:INVALID_FIELD

 I have custom object having look up on lead, the column is Lead__c. I use javascript(ajax) to fetch the record "Select Lead__c From DSLeadDuplicate__c", similar logic for account and contact work with out any error.

 

The error message I get is

An error has occurred: {faultcode:'sf:INVALID_FIELD', faultstring:'INVALID_FIELD: Select Lead__c From DSLeadDuplicate__c ^ ERROR at Row:1:Column:8 No such column 'Lead__c' on entity 'DSLeadDuplicate__c'. 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.', detail:{InvalidFieldFault:{exceptionCode:'INVALID_FIELD', exceptionMessage:' Select Lead__c From DSLeadDuplicate__c ^ ERROR at Row:1:Column:8 No such column 'Lead__c' on entity 'DSLeadDuplicate__c'. 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.', row:'1', column:'8', }, }, }

 

Any help is appreciated

Best Answer chosen by Admin (Salesforce Developers) 
Imran MohammedImran Mohammed

Use Ajax Tools to find the exact field name and then use in your query.

All Answers

Imran MohammedImran Mohammed

Use Ajax Tools to find the exact field name and then use in your query.

This was selected as the best answer
hector.asp2hector.asp2

Changed column name from Lead__c to Lead_link__c (If I had field name as Lead__c, it was not visible in Apex Explorer).

Thanks a lot....