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

Error with replicating the object ContentDocumentLink

Error with replicating the object ContentDocumentLink: There error is :
Error(EREQUEST) - Ending SF_Replicate Operation Failed.
Other objects replicate fine.
1 person has
this question
+1
Reply
  • Can you post the complete message output for only ContentDocumentLink. What is the exact command you are running? Also, what version of DBAmp are you currently running?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Hi, I also have the error when replicating the object, I hear we need to use the where clause, but I have to replicate over a million records.

    Is there any fix or workaround for this object to be replicated?

    DBamp version 3.6.9.0

    Using:

    exec [salesforce_sandbox].dbo.SF_Replicate 'SALESFORCE_APP', 'ContentDocumentLink'
    GO

    Getting error:

    --- Starting SF_Replicate for ContentDocumentLink V3.6.9
    06:43:04: Parameters: SALESFORCE_APP ContentDocumentLink Version: V3.6.9
    06:43:04: Drop ContentDocumentLink_Previous20181212T064304067 if it exists.
    06:43:04: Create ContentDocumentLink_Previous20181212T064304067 with new structure.
    06:43:04: DBAmpNet2 3.6.9.0 (c) Copyright 2015-2017 forceAmp.com LLC
    06:43:04: Parameters: replicate ContentDocumentLink_Previous20181212T064304067 IP-AC1E001C Salesforce_Sandbox SALESFORCE_APP
    06:43:05: Error System.Web.Services.Protocols.SoapException: MALFORMED_QUERY: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN o
    perator.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at DBAmpNet2.sforce.SforceService.query(String queryString)
    at DBAmpNet2.SFDataLayer3.QuerySF()
    06:43:05: DBAmpNet2 Operation FAILED.
    06:43:05: Error: Replicate program was unsuccessful.
    06:43:05: Error: Command string is C:\"Program Files"\DBAmp\DBAmpNet2.exe Exportsoap "Replicate" "ContentDocumentLink_Previous20181212T064304067" "IP-AC1E001C" "Salesforce_Sandbox " "SALESFORCE_APP"
    --- Ending SF_Replicate. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure Salesforce_Sandbox.dbo.SF_Replicate, Line 406
    --- Ending SF_Replicate. Operation FAILED.

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

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

  • The Error is: "MALFORMED_QUERY: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN o
    perator."

    The Salesforce Server does not allow you to query all records for this object, there has to be a where clause on the query. Therefore, this table cannot be replicated. This is a Salesforce restriction, not a DBAmp restriction.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Thanks Justin,

    Then there is no other choice than replication one by one for the ~1M records I have right?

    Would you advise any workaround?
    I need to update LinkedEntityId with ParentId for all the records since from Load it would be empty...
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • The only way to pull records from ContentDocumentLink is to filter either on the ContentDocumentId or the LinkedEntityId field in the where clause of the query. You can use the IN operator to bring down multiple records.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

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

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