Skip to content

Export mapping with related fields #854

Closed Answered by ashitsalesforce
phiff asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @phiff , can you share your SoQL query and process.mappingFile property in your config.properties file?

Here is my org's setup:
2 custom sobjects:
childCustom__c sobject:

  • field parentCustomName__c is a Lookup field pointing to parentCustom__c

parentCustom__c sobject:

  • Text field field1__c

I created the following mapping:

name=childname
ParentCustomName__r.field1__c=parentField1

I ran the following query:

SELECT name, ParentCustomName__r.field1__c
FROM ChildCustom__c  where id='xxxxxxxxxxxxxxxxx'

Here is the result in a csv file:

"PARENTFIELD1","CHILDNAME"
"More parent","c1"

The csv file shows that the field mapping is correctly applied.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@phiff
Comment options

@ashitsalesforce
Comment options

Answer selected by phiff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants