diff --git a/lib/stripe-force/translate/mapper.rb b/lib/stripe-force/translate/mapper.rb index 376c08694b..39f299a941 100644 --- a/lib/stripe-force/translate/mapper.rb +++ b/lib/stripe-force/translate/mapper.rb @@ -58,7 +58,7 @@ def extract_salesforce_object_field(sf_object, key_path) components.each_with_index do |field_name, i| is_last_component = i == components.size - 1 - normalized_field_name = if !is_last_component && !field_name.end_with?('__c') + normalized_field_name = if !is_last_component && !field_name.end_with?('__c') && !field_name.end_with?('Id') field_name + "Id" else field_name diff --git a/test/unit/test_mapper.rb b/test/unit/test_mapper.rb index e13814e41b..3b7040c1b4 100644 --- a/test/unit/test_mapper.rb +++ b/test/unit/test_mapper.rb @@ -83,6 +83,7 @@ class MapperTest < Critic::UnitTest "subscription_schedule" => { 'metadata.field_custom' => 'CustomField__c', 'metadata.second_custom' => 'CustomField__c', + 'metadata.third_custom' => 'AccountId.Id', 'default_settings.automatic_tax' => 'TaxBoolean__c', }, }