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

Clear example of SF_BulkOps with UPSERT

Hello,

Could someone PLEASE post a clear example of the usage of SF_BulkOps using UPSERT?

Assume the load table is Account_Load and the External ID is Customer_ID.

Thanks!
1 person has
this question
+1
Reply
  • exec sf_bulkops 'Upsert','SALESFORCE','Account_Load','Customer_ID__c'

    Notes:

    1. A custom field in salesforce always end with __c. Therefore I assume your external id field is really Customer_ID__c

    2, There must be an Id , error and Customer_Id__c field in Account_Load. The id field can be null and will be filled in with the actual id after the call. The Customer_ID__c should have a value for all rows.

    3. If you are having issues , please post the complete message output.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Hi Bill,

    Thanks for your quick reply.

    I change the initial call from this :

    EXEC @RC = [dbo].[SF_BulkOps]
    @operation = 'UPSERT'
    ,@table_server = '[SALESFORCE_LINKED_SERVER]'
    ,@table_name = 'Account_Load'
    ,@opt_param1 = 'Customer_Id__c'
    ,@opt_param2 = NULL

    to this:

    EXEC @RC = [dbo].[SF_BulkOps]
    'UPSERT'
    ,'[SALESFORCE_LINKED_SERVER]'
    ,'Account_Load'
    ,'Customer_Id__c'

    But still no dice.

    A colleague suggested to remove the square brackets from the second param, and that did the trick:

    EXEC @RC = [dbo].[SF_BulkOps]
    'UPSERT'
    ,'SALESFORCE_LINKED_SERVER'
    ,'Account_Load'
    ,'Customer_Id__c'

    Thanks for your help!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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