Help get this topic noticed by sharing it on Twitter, Facebook, or email.

SF_BULKOPS - UPSERT operation failing with Invalid Field Index

Hi
we have tried below script
exec SF_BULKOPS 'upsert','SALESFORCE','Table__c_load','BA_Scenario_Id__c'

We are getting below error
Invalid field index::ba_scenario_id__c

Please advise
1 person has
this question
+1
Reply
  • 1. Please post the entire message output.
    2. Is BA_Scenario_id__c defined on salesforce as both an external id and unique ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned



  • Yes, BA_Scenario_id__c is external id and unique.

    This screen dump is for the query output of the staging table where we create id and error column.

    I have uploaded the error screen . Please check and revert.

    Thanks
    Sandeep
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • 1. Please post the entire message output of the sf_bulkops command.

    2. What salesforce object has BA_Scenario_id__c field ? Is it the Escrow__c object or the Scenario__c object ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • Hi Bill,

    I have the same issue on one of my upsert. Could you please check error log and advice.

    --- Starting SF_BulkOps for affiliation__C_deu_testing_csv V3.1.7
    15:31:57: Run the DBAmp.exe program.
    15:31:57: DBAmp Bulk Operations. V3.4.4 (c) Copyright 2006-2017 forceAmp.com LLC
    15:31:57: Upserting Salesforce using affiliation__C_deu_testing_csv (sqlserverSRxxx\dev / Salesforce) .
    15:31:58: DBAmp is using the SQL Native Client.
    15:31:59: SOAP Headers:
    15:31:59: Warning: Column 'Affiliation_Type' ignored because it does not exist in the Affiliation__c object.
    15:31:59: Warning: Column 'market_code__C' ignored because it not insertable in the Affiliation__c object.
    15:31:59: Warning: Column 'Sort' ignored because it does not exist in the Affiliation__c object.
    15:31:59: Warning: Column 'Affiliation__c' ignored because it does not exist in the Affiliation__c object.
    15:31:59: Warning: Column 'Account' ignored because it does not exist in the Affiliation__c object.
    15:31:59: Warning: Column 'OwnerId' ignored because it does not exist in the Affiliation__c object.
    15:31:59: Warning: Column 'Account' ignored because it does not exist in the Affiliation__c object.
    15:31:59: 2 rows read from SQL Table.
    15:31:59: 2 rows failed. See Error column of row for more information.
    15:31:59: 0 rows successfully processed.
    15:31:59: Errors occurred. See Error column of row for more information.
    15:31:59: Error: DBAmp.exe was unsuccessful.
    15:31:59: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe upsert: affiliation__C_deu_testing_csv "sqlserverSRxxx\dev" "Salesforce" "LS_Salesforce" "[Affiliation__c.Unique_external_id__c]" " "
    --- Ending SF_BulkOps. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_BulkOps, Line 141 [Batch Start Line 97]
    SF_BulkOps Error: 15:31:57: DBAmp Bulk Operations. V3.4.4 (c) Copyright 2006-2017 forceAmp.com LLC15:31:57: Upserting Salesforce using affiliation__C_deu_testing_csv (sqlserverSRxxx\dev / Salesforce) .15:31:58: DBAmp is using the SQL Native Client.15:31:59: SOAP Headers: 15:31:59: Warning: Column 'Affiliation_Type' ignored because it does not exist in the Affiliation__c object.15:31:59: Warning: Column 'market_code__C' ignored because it not insertable in the Affiliation__c object.15:31:59: Warning: Column 'Sort' ignored because it does not exist in the Affiliation__c object.15:31:59: Warning: Column 'Affiliation__c' ignored because it does not exist in the Affiliation__c object.15:31:59: Warning: Column 'Account' ignored because it does not exist in the Affiliation__c object.15:31:59: Warning: Column 'OwnerId' ignored because it does not exist in the Affiliation__c object.15:31:59: Warning: Column 'Account' ignored because it does not exist in the Affiliation__c object.15:31:59: 2 rows read from SQL Table.15:31:59: 2 rows failed. See Error column of row for more information.15:31:59: 0 rows successfully processed.15:31:59: Errors occurred. See Error column of row for more information.

    Error messages in Error field

    1st row Invalid field index::[affiliation__c.unique_external_id__c]
    2nd row Error: Unable to retrieve ID from salesforce.com

    Thanks and Regards,
    Vijay
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • What is the actual command you are using (along with the parameters you are passing) ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • This is the command I am using,

    Exec SF_BulkOps 'Upsert:Parallel,Batchsize(38)','Salesforce','affiliation__C_deu_testing_csv','[Affiliation__c.Unique_external_id__c]'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • The last parameter should not be prefixed or in quotes:

    Exec SF_BulkOps 'Upsert:Parallel,Batchsize(38)','Salesforce','affiliation__C_deu_testing_csv','Unique_external_id__c'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • Hi Bill,

    Hopefully you're still monitoring this thread as I'm having the same issue as well. Below is the output message from DBAmp and the exec statement I'm using. Weird thing to note though is that if I try to do more than 1 record, it will insert the following records - it's only the first record that gives this error? But for the purposes of testing I'm limiting to 1 record. I've made sure that CW_Config_RecID is both Unique and External Id as well. Thanks in advance for any help!

    (1 row(s) affected)
    --- Starting SF_BulkOps for Asset_Config_Load V3.4.1
    16:08:22: Run the DBAmp.exe program.
    16:08:22: DBAmp Bulk Operations. V3.4.1 (c) Copyright 2006-2017 forceAmp.com LLC
    16:08:22: Upserting Salesforce using Asset_Config_Load (REVSQL02 / salesforceBackups_FULLCOPYSB) .
    16:08:23: DBAmp is using the SQL Native Client.
    16:08:24: SOAP Headers:
    16:08:24: 1 rows read from SQL Table.
    16:08:24: 1 rows failed. See Error column of row for more information.
    16:08:24: 0 rows successfully processed.
    16:08:24: Errors occurred. See Error column of row for more information.
    16:08:24: Percent Failed = 100.000.
    16:08:24: Error: DBAmp.exe was unsuccessful.
    16:08:24: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe upsert Asset_Config_Load "REVSQL02" "salesforceBackups_FULLCOPYSB" "Salesforce_fullcopysb" "CW_Config_RecId" " "
    --- Ending SF_BulkOps. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_BulkOps, Line 189
    SF_BulkOps Error: 16:08:22: DBAmp Bulk Operations. V3.4.1 (c) Copyright 2006-2017 forceAmp.com LLC16:08:22: Upserting Salesforce using Asset_Config_Load (REVSQL02 / salesforceBackups_FULLCOPYSB) .16:08:23: DBAmp is using the SQL Native Client.16:08:24: SOAP Headers: 16:08:24: 1 rows read from SQL Table.16:08:24: 1 rows failed. See Error column of row for more information.16:08:24: 0 rows successfully processed.16:08:24: Errors occurred. See Error column of row for more information.

    (1 row(s) affected)

    exec SF_BulkOps 'Upsert', 'Salesforce_fullcopysb', 'Asset_Config_Load', 'CW_Config_RecId';

    select * from Asset_Config_Load

    Error Column: Invalid field index::asset.cw_config_recid
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • The error is telling you that there is not a field in the asset object with the name cw_config_recid

    Check the api field name. Perhaps you are missing the__c in the field name.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • Hi Bill,

    I have another one for you. We have an object called "Asset" (which you helped me with in the earlier post) and now we have "Asset_History" object that I'm trying to load. However I'm noticing in the message being returned that it's trying to update the Asset object instead of Asset_History? How do I get it to see the Asset_History object? Below is the message and the command I'm trying to use.

    --- Starting SF_BulkOps for Asset_History_Load2 V3.4.1
    23:57:57: Run the DBAmp.exe program.
    23:57:57: DBAmp Bulk Operations. V3.4.1 (c) Copyright 2006-2017 forceAmp.com LLC
    23:57:57: Upserting Salesforce using Asset_History_Load2 (REVSQL02 / salesforceBackups_FULLCOPYSB) .
    23:57:57: DBAmp is using the SQL Native Client.
    23:57:58: SOAP Headers:
    23:57:59: Warning: Column 'Updated_By__c' ignored because it does not exist in the Asset object.
    23:57:59: Warning: Column 'Updated_Date__c' ignored because it does not exist in the Asset object.
    23:57:59: Warning: Column 'CW_Audit_ID__c' ignored because it does not exist in the Asset object.
    23:57:59: 11 rows read from SQL Table.
    23:57:59: 11 rows failed. See Error column of row for more information.
    23:57:59: 0 rows successfully processed.
    23:57:59: Errors occurred. See Error column of row for more information.
    23:57:59: Percent Failed = 100.000.
    23:57:59: Error: DBAmp.exe was unsuccessful.
    23:57:59: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe upsert Asset_History_Load2 "REVSQL02" "salesforceBackups_FULLCOPYSB" "Salesforce_fullcopysb" "CW_Audit_ID__c" " "
    --- Ending SF_BulkOps. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_BulkOps, Line 189
    SF_BulkOps Error: 23:57:57: DBAmp Bulk Operations. V3.4.1 (c) Copyright 2006-2017 forceAmp.com LLC23:57:57: Upserting Salesforce using Asset_History_Load2 (REVSQL02 / salesforceBackups_FULLCOPYSB) .23:57:57: DBAmp is using the SQL Native Client.23:57:58: SOAP Headers: 23:57:59: Warning: Column 'Updated_By__c' ignored because it does not exist in the Asset object.23:57:59: Warning: Column 'Updated_Date__c' ignored because it does not exist in the Asset object.23:57:59: Warning: Column 'CW_Audit_ID__c' ignored because it does not exist in the Asset object.23:57:59: 11 rows read from SQL Table.23:57:59: 11 rows failed. See Error column of row for more information.23:57:59: 0 rows successfully processed.23:57:59: Errors occurred. See Error column of row for more information.

    (11 row(s) affected)

    EXEC SF_BulkOps 'Upsert', 'Salesforce_fullcopysb', 'Asset_History_Load2', 'CW_Audit_ID__c';
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • What is the error message in the error column? Also, are you sure the name of the object is Asset_History? Can you show me it in the results from the following query:

    select * from Salesforce_fullcopysb...sys_sfobjects
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned

  • Thank you Justin! In pulling the object list I saw there was the darned "__c" on the Asset_History table! Still getting used to SF :)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned