Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
onchar
Contributor
Contributor

salesforce SOQL

I am trying to pull a fields value from Salesforce using Talend.  The field name in this case is Afieldname__c and has a datatype=Lookup(AnObject) where AnObject is the object name in Salesforce that has the Afiledname_Org__c field name i am trying to query.

 

The error i am getting is :

java.io.IOException: [InvalidFieldFault [ApiQueryFault [ApiFault exceptionCode='INVALID_FIELD'
exceptionMessage='
SELECT Afieldname__c

 

Does anyone know how I need to setup my schema and construct the query, or dealt with something similar?  Please let me know.

 

Thank you for your support.

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

1rst, you must be sure the user you use for the connection has the visibility on the fields you want to query.

2nd, as soon as you don't try to query fields from an associated object, don't use the "Manual query" option. Just complete the schema for the tSalesforceInput component, that's all.

If you want to query a field from a parent object (for example, the object associated with the component is Contact and you want to query Account field), you need to write the query using the dot notation as for any SOQL query (Account.Name in my example).

If the relationship is based on a custom field, you need to replace the "__c" by "__r". For your case, the query must be "Afieldname__r.Afiledname_Org__c".

The last but not the least, in schema you need to replace dots by underscrores characters. If your case, the field in the schema must be "Afieldname__r_Afiledname_Org__c".

Hope this helps.

View solution in original post

3 Replies
TRF
Champion II
Champion II

1rst, you must be sure the user you use for the connection has the visibility on the fields you want to query.

2nd, as soon as you don't try to query fields from an associated object, don't use the "Manual query" option. Just complete the schema for the tSalesforceInput component, that's all.

If you want to query a field from a parent object (for example, the object associated with the component is Contact and you want to query Account field), you need to write the query using the dot notation as for any SOQL query (Account.Name in my example).

If the relationship is based on a custom field, you need to replace the "__c" by "__r". For your case, the query must be "Afieldname__r.Afiledname_Org__c".

The last but not the least, in schema you need to replace dots by underscrores characters. If your case, the field in the schema must be "Afieldname__r_Afiledname_Org__c".

Hope this helps.

onchar
Contributor
Contributor
Author

Thank you...

Anonymous
Not applicable

Hi,

 

After replacing by the _ also not working for me.

 

Can you help me on this?

 

Thanks,

Karthik

 


Agreement__r_Name.PNG
error_message.PNG