• Jason Kelley
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I'm trying to create groups of ContentDistribution records via Apex.  Unfortunately, when inserting them, I'm getting the following error:
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>:
Here are the two records trying to insert:
ContentDistribution:{Name=test0, ContentVersionId=068m00000009X4zAAE, PreferencesAllowOriginalDownload=true, PreferencesAllowPDFDownload=true, PreferencesAllowViewInBrowser=true, ExpiryDate=2015-07-31 00:00:00, PreferencesExpires=true, RelatedRecordId=a4S60000000L1cgEAC}
ContentDistribution:{Name=test1, ContentVersionId=068m00000009X4zAAE, PreferencesAllowOriginalDownload=true, PreferencesAllowPDFDownload=true, PreferencesAllowViewInBrowser=true, ExpiryDate=2015-07-26 00:00:00, PreferencesExpires=true, RelatedRecordId=a4S60000000KztXEAS}
The only duplicate value between the two is the ContentVersionID, which I assume should be fine. 



 
I'm trying to create groups of ContentDistribution records via Apex.  Unfortunately, when inserting them, I'm getting the following error:
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>:
Here are the two records trying to insert:
ContentDistribution:{Name=test0, ContentVersionId=068m00000009X4zAAE, PreferencesAllowOriginalDownload=true, PreferencesAllowPDFDownload=true, PreferencesAllowViewInBrowser=true, ExpiryDate=2015-07-31 00:00:00, PreferencesExpires=true, RelatedRecordId=a4S60000000L1cgEAC}
ContentDistribution:{Name=test1, ContentVersionId=068m00000009X4zAAE, PreferencesAllowOriginalDownload=true, PreferencesAllowPDFDownload=true, PreferencesAllowViewInBrowser=true, ExpiryDate=2015-07-26 00:00:00, PreferencesExpires=true, RelatedRecordId=a4S60000000KztXEAS}
The only duplicate value between the two is the ContentVersionID, which I assume should be fine. 



 

Hi,

 

When I am trying to display the NotesAndAttachments on the visualforce page i am getting the above error

I have used the following tag to display NotesAndAttachments on the page. Kindly do needfull asap.

 

<apex:relatedList  list="NotesAndAttachments"  title="Request For Proposal(RFP)" subject="{!QIF_API__c.id} />

  • September 18, 2013
  • Like
  • 0