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

SF_Generate insert table for custom objects

Hi,

We are using SF_Generate to create insert tables for custom objects however we are getting no columns created outside of [Id] and [Error] columns. When we use SF_Replicate we get all columns and all the data successfully.

We had the same symptoms originally with the default Campaign object before we applied the 'Marketing User' flag to the credentials. Is there certain permissions or settings we need to apply to successfully generate the insert table?

Our custom object is Sales_Forecasts__c and the statement we are using is

EXEC SF_Generate 'INSERT', 'SALESFORCE', 'Sales_Forecasts__c_Load'
1 person has
this question
+1
Reply
  • What version of DBAmp are you currently running? Do you have the message output from the SF_Generate?
  • (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

  • Thanks for the reply.
    Version: 3.6.5.0
    Output of Generate:
    --- Starting SF_Generate V3.6.5
    Create Table Sales_Forecasts__c_Load ([Id] nchar(18) null,[Error] nvarchar(2000) null)

    Output of Replicate:
    --- Starting SF_Replicate for Sales_Forecasts__c V3.6.5
    00:54:52: Parameters: SALESFORCE Sales_Forecasts__c Version: V3.6.5
    00:54:52: Drop Sales_Forecasts__c_Previous if it exists.
    00:54:52: Create Sales_Forecasts__c_Previous with new structure.
    00:54:52: DBAmpNet2 3.6.5.0 (c) Copyright 2015-2017 forceAmp.com LLC
    00:54:53: Parameters: replicate Sales_Forecasts__c_Previous {servername} SalesforceSync SALESFORCE
    00:54:54: 14 rows copied.
    00:54:54: DBAmpNet2 Operation successful.
    00:54:54: Drop Sales_Forecasts__c if it exists.
    00:54:54: Rename previous table from Sales_Forecasts__c_Previous to Sales_Forecasts__c
    Caution: Changing any part of an object name could break scripts and stored procedures.
    00:54:54: Create primary key on Sales_Forecasts__c
    --- Ending SF_Replicate. Operation successful.
  • (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

  • We think there is a bug in SF_Generate and are looking into it. As a workaround, the following should get you what you want:

    select * into Sales_Forecasts__c_Load from SALESFORCE...Sales_Forecasts__c where 1=0

    You'll have to delete the current load table with the same name before running the above statement.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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