Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Tool is ignoring field mapping #895

Closed
mohanta-pankaz opened this issue Sep 29, 2024 · 6 comments
Closed

[BUG] - Tool is ignoring field mapping #895

mohanta-pankaz opened this issue Sep 29, 2024 · 6 comments
Assignees
Labels
bug Something isn't working, looks like a bug completed The issue was successfully resolved/Feature is completed

Comments

@mohanta-pankaz
Copy link

mohanta-pankaz commented Sep 29, 2024

Describe the bug
I am running a use case where I need to move a custom object records between the orgs. I attempted doing multiple things to map the target org record Id as an externalId on source org field but it never writes the value into that field. I believe the tool is ignoring the field.

Few key points to be noted for better understanding of the context :
There was an earlier migration happened from Target to Source couple years back now we want to do reverse.

  1. [Source] X_18_Record_Id (Text) (External ID) => This field holds the [Target record ref Id which was created earlier during first migration]
  2. [Target] X_18_Record_Id (Formula)

Now I want to store [Source] record Id value into some other field New_Source_Id__c (Text)(External) on [Target] as the order of migration is now reversed.

.....

"fieldMapping": [
               {
                   "targetObject": "MyCustom_Object__c"
               },
               {
                   "sourceField": "Id",   // This Id I want to map from Source org 
                   "targetField": "New_Source_Id__c" // This field is not present in Source but I want to populate it on target to keep a ref of migrated records
                 }
           ]

....
Output : It is writing target record id into New_Source_Id__c (Text) instead of Source record Id

.....

 "fieldMapping": [
                {
                    "targetObject": "MyCustom_Object__c"
                },
                {
                    "sourceField": "X18_Formula_Record_ID__c", // I tried mapping with creating a new formula field on Source populating record Id
                    "targetField": "New_Source_Id__c"
                  }
            ]

....
Output : It is not writing anything into New_Source_Id__c (Text) , even on output csv on target it doesn't show value for this column (X18_Formula_Record_ID__c)

To Reproduce

{
    "objects": [
        {
            "query": "SELECT Id ,X18_Record_ID__c, Name FROM MyCustom_Object__c Where calendar_year(createddate) =2012",
            "operation":"Upsert",
            "externalId":"X18_Record_ID__c",
            "useFieldMapping": true,
            "fieldMapping": [
                {
                    "targetObject": "MyCustom_Object__c"
                },
                {
                    "sourceField": "Id",
                    "targetField": "New_Source_Id__c"
                  }
            ]
        }
    ]
}

Expected behavior
It should write the value as per mapping irrespective of formula or text.

export.json
Attach your export.json file.
Reference: https://help.sfdmu.com/full-documentation/export-json-file-objects-specification/export-json-file-overview

Log file
Attach your full .log file.
Reference: https://help.sfdmu.com/full-documentation/reports/the-execution-log

_target.csv file.
When you have an issue with failed rows, attach the dump of the _target.csv file containing the error messages (at least 1-2 relevant full rows).
Reference: https://help.sfdmu.com/full-documentation/reports/the-target-csv-files

@mohanta-pankaz mohanta-pankaz added the bug Something isn't working, looks like a bug label Sep 29, 2024
@hknokh
Copy link
Collaborator

hknokh commented Sep 29, 2024

Hello, @mohanta-pankaz

Thank you for reporting a bug.
I will take a look at it as soon as possible and let you know of any updates.

Cheers

@hknokh
Copy link
Collaborator

hknokh commented Sep 30, 2024

Hey, @mohanta-pankaz
I'm still checking this and let you know as soon as I can.
Regards

@hknokh hknokh added the in-progress Issue is currently in the resolution progress label Sep 30, 2024
@mohanta-pankaz
Copy link
Author

Hello @hknokh , any updates on this?

@hknokh2
Copy link
Contributor

hknokh2 commented Oct 1, 2024

Hello
Not for now, I will update you.

hknokh pushed a commit that referenced this issue Oct 24, 2024
hknokh pushed a commit that referenced this issue Oct 24, 2024
hknokh pushed a commit that referenced this issue Oct 26, 2024
hknokh pushed a commit that referenced this issue Oct 29, 2024
@hknokh2
Copy link
Contributor

hknokh2 commented Oct 30, 2024

Hello,
Your issue should be solved.
Now the source id should be copied when mapped to another field in the target side.
Please update and check
Cheers

@hknokh hknokh added completed The issue was successfully resolved/Feature is completed and removed in-progress Issue is currently in the resolution progress labels Nov 4, 2024
@hknokh
Copy link
Collaborator

hknokh commented Nov 4, 2024

Hello.

This case is now considered resolved, and I am closing it for now. If you have any additional questions or concerns, please don't hesitate to reach out.

Regards.

@hknokh hknokh closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, looks like a bug completed The issue was successfully resolved/Feature is completed
Projects
None yet
Development

No branches or pull requests

3 participants