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

Cannot find record using dbamp query but record exists within SalesForce web interface

I am trying to find a Task record which is in SF but is not being picked up via a dbamp query for this same record, and cannot understand how this record is visible in SF (I use the same login for SF web as I use as the security context login for my dbamp linked server to SF) but not from my dbamp query (my dbamp linked server is pointed to SF production - https://salesforce.com).

I have this record which appears in SF web:
https://na2.salesforce.com/00T4000002...

But trying to find this record via the dbamp query:

SELECT t.* FROM salesforceprod...Task t WHERE t.Id = '00T4000002F7g1JEAR'

returns no result.

Any help as to how my dbamp query could not be returning the same result as the SF web interace, would be appreciated.
1 person has
this problem
+1
Reply
  • It could be an Archived Task.

    Can you run this query and report the results?

    SELECT t.* FROM salesforceprod...Task_QueryAll t WHERE t.Id = '00T4000002F7g1JEAR'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Yes. That displays the record. Thank you. Now I have another question that arises from this. I am using both the refesh and replicate SPROCs to replicate SF Task data to SQL Server.

    EXEC SalesForce.dbo.SF_Refresh 'SALESFORCEPROD' , 'Task'
    EXEC SalesForce.dbo.SF_Replicate 'SALESFORCEPROD' , 'Task'

    It looks like these are not picking up archived tasks. What do I need to do to get ALL DATA (including any archived data whether it be Tasks, Contacts, Accounts, etc.)?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • You can use SF_ReplicateIAD and SF_RefreshIAD.

    Begin the process by using SF_ReplicateIAD to get a full copy including the archived records.

    From the DBAmp Documentation (page 27)

    Once you begin to use SF_ReplicateIAD for a table, DO NOT USE sf_replicate on that table. If you run sf_replicate instead of sf_replicateIAD, you will lose all the permanently deleted rows in the local table.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Thanks. This replication is timing out for me. Is this a dbamp timeout setting I need to change?

    --- Starting SF_ReplicateIAD for Task
    15:43:37: Drop Task_Previous if it exists.
    15:43:37: Create Task_Previous with new structure.
    15:43:37: Run the DBAmp.exe program.
    15:43:37: DBAmp Bulk Operations. V2.17.2 (c) Copyright 2006-2013 forceAmp.com LLC
    15:43:37: Populating local table (including archived/deleted records) Task_Previous , localhost/ SalesForce .
    15:43:37: DBAmp is using the SQL Native Client.
    15:43:37: Opening SQL Server rowset
    16:03:38: Error: RunQuery failed with com_error.
    16:03:38: FAHttp::Send::WinHttpReceiveResponse
    Win32Error::
    The operation timed out
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • This is a client side network timeout. DBAmp has timed out waiting for a response from the salesforce.com server.

    You can increase the client side timeout using the Registry Editor on the server DBAmp is installed on. Navigate to the HKEY_LOCAL_MACHINE/SOFTWARE/DBAmp and modify the value of ReceiveTimeout to 2800. ReceiveTimeout is the number of seconds to wait for a response from salesforce.

    Then retry the operation.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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