Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.
Thank you...
Hi,
After replacing by the _ also not working for me.
Can you help me on this?
Thanks,
Karthik