You need to sign in to do that
Don't have an account?

Exception: duplicate value found: <unknown> duplicates value on record with id: <unknown>: []
Hi
I'm new to this so please forgive my ignorance.
I'm getting the exception when:
- insert an Opportunity
- insert a ContentVersion
- post the new ContentVersion to the Opportunity's chatter feed
- delete the Opportunity
Does anybody know why, and if so, how to overcome the exception?
I am using API version 26.0
Thanking you in advance
private static void TestOpportunityDeletion()
{
// create an opportunity
Opportunity opp = new Opportunity() ;
opp.Name = 'Test Name' ;
opp.StageName = 'Test Stage Name' ;
opp.CloseDate = Date.Today() ;
insert opp ;
// attach a document to its chatter feed
ContentVersion doc = new ContentVersion() ;
doc.Title = 'Test Version' ;
doc.PathOnClient = 'test version.docx' ;
doc.VersionData = Blob.ValueOf( 'test content' ) ;
doc.Origin = 'H' ;
insert doc ;
FeedItem post = new FeedItem() ;
post.Type = 'ContentPost' ;
post.ParentID = opp.Id ;
post.RelatedRecordID = doc.id ;
insert post ;
// delete the opportunity
delete opp ;
}
delete post;
Then your code will work.
All Answers
delete post;
Then your code will work.
Thanks for that - it works a treat.
However, does that mean for every SalesForce object that potentially has a chatter feed, we must introduce a trigger which deletes its feed items before it is deleted itself?
When you delete a record, the Chatter post on the record will also be deleted, but the file will be left.
In your case, it is a little strange. When you delete the record from the interface, you got the same error.
I will try to figure it out later, when I have time.
DTC Bus App has been downloaded by more than 1 million users, and has changed the way we check DTC BUS Routes (https://dtcbus.online/dtc-routes/). Initially launched in the year of 2015, DTC BUS app (https://dtcbus.online/apk/) has now become immensely popular across all platforms.
DTC BUS APP Features
Delhi Metro Map(DMRC), Noida-Greater Noida Metro Map (NMRC) ,Route, fare, Journey Time, Card Recharge, Station Information with first and last train timings.
Delhi DTC Bus Route Detail with Source and Destination Routes.
Orange cluster bus operated by DIMTS also included.
Nearest Metro Station and DTC Bus from your Current location with distance.
Airport & Rapid Metro Gurgaon also integrated.
Latest Auto-Fare Chart
Noida Metro (NMRC) city bus is also added upto date.
Up to date data for all types of public transports in NCR , Noida, Gurgaon , Faridabad, Ghaziabad.
https://dtcbus.online/
I'm also suffering such a problem with the AndroDumpper app (https://softzforpc.com/androdumpper-for-windows-10-8-7-mac-pc/). It is an Android app, But I have started working to developing it for PC (Windows/Mac) etc.
Every mother feels her love and appreciation on her special day. From her immense patience to her endless support, there are many things to be grateful for your mother. If you are struggling to find the right way to express the depth of your love and here are some ways to give you happy birthday wishes that inspire you. Whether she is sweet, lovely, kind, or insane, hopefully, there is a message that resonates with you. Happy Birthday Mom (https://www-happybirthdaywishes.com/happy-birthday-mom-birthday-wishes-messages/)
I do agree with Mr Jia Hu, you should not delete record first, i have faced the similar issue while I and my small team were developing an app for a client (daily calory tracking app in health category) ultimately we removed all record and did the set up again, it works! By the way, you may try this (https://download.zone/rstudio-for-windows-download/)
hope it may work for you and others,
Thanks,
Gayatri
I do agree with your concern and Mr Jia Hu as well. I did resolve the bug later as per you and Mr Hu explained. It is on this page: https://filehulk.com/download-avast-internet-security/ (https://filehulk.com/download-avast-internet-security/)
https://freefilehippo.com/game-loop-android-emulator/
Thanks
https://download.guru/top-10-best-vpn-software/
Thanks and regards,
https://thevpnforpc.com/turbo-vpn-for-pc/
I do agree with Mr Jia Hu, you should not delete record first,
https://freesoftforpc.com/install-v380-pro-for-pc/
https://freesoftforpc.com/imaengine-for-pc/
https://freesoftforpc.com/pathbuilder-for-pc/
https://freesoftforpc.com/cm-vpn-on-pc/
https://www.gameloop.me/brawl-stars-on-pc/
https://www.laptopfunda.com/laptops-with-thunderbolt-3/
https://www.saeedhub.us/official-kmspico/
https://www.ithubpk.com/best-ssd-for-gaming/
https://www.tencentgamingbuddy.co/gameloop/download-bluestacks-windows10/
https://ultimateelectricshavers.com/best-electric-shavers-for-men/
https://www.toolpub.com/kinemaster-for-pc/
Best Regards
Ashish Sharma
Digital Marketing Agency Indore (https://indiancyberdude.com)
best regards
love shayari (https://xn--i1b3gad2a2cdg.com)
best regards
Kinemaster Pro Apk Download
best regards
MP3 Rocket Download
best regards
Fourthspeaker
also check below some Earphones for you:-
1. Sennheiser CX Sport Review (https://fourthspeaker.com/sennheiser-cx-sport-review/)
Regards
Kinemaster Pro APK Download
And I am glad studying your article. However, should remark on some normal issues, the website taste is ideal, the articles are truly great: D. Excellent job, cheers
If you are gaming lover (https://www.gamingfreak.in" target="_blank) then you can visit our Web site . If you are looking online job portal visit to quickjobsalert (https://quickjobsalert.com" target="_blank)
With Turbo VPN you will have more security and privacy at the time of surfing the internet. Turbo VPN provides a stable connection which is very helpful nowadays.
.<a href="https://arenteiro.com/mp3juices-free-mp3-downloads/">MP3Juices</a>
genymotion crack (https://incracked.com/genymotion-crack/)
But CyberGhost actually cares. With their amazing server locations, amazing server setup, crypto, and much more, CyberGhost is the best VPN I have ever used." - Brandon Stosh, Freedom Hackers. ️
genymotion break TechHypes (https://www.techhypes.com/)
insert an Opportunity
insert a ContentVersion
post the new ContentVersion to the Opportunity's chatter feed
delete the Opportunity
Visite to https://apex-legendsmobile.com
When you delete a record, the Chatter post on the record will also be deleted, but the file will be left.
In your case, it is a little strange. When you delete the record from the interface, you got the same error.
I will try to figure it out later, when I have time. https://www.hackingcastle.com/
or visit - https://www.hackingcastle.com/2020/05/john-the-ripper-password-cracking-full-tutorial.html
delete post;
Then your code will work.
After doing this code is working ( https://pubglitepc.com )
I recently joined your forum post ,I found its very informative and knowledgeable . I am very impressed.
Thanks for sharing this post. Keep posting more forum post.
also see: [url=https://myhrkp.club/]myhr kp[/url]
I recently joined your forum post ,I found its very informative and knowledgeable . I am very impressed.
Thanks for sharing this post. Keep posting more forum post.
Also read: <a href="https://myhrkp.club/">myhr kp</a>
Thank you for sharing this. It was helpful. Keep sharing such things. Also Download the latest version of Nulls Royale (https://clashmod.net/nulls-royale-apk/) which has unlimited gems and gold.
For more information check the https://apkmodstudio.com/hay-day-mod-apk/
apexlegendsmobile.co (https://www.apexlegendsmobile.co/) and gameloop.me and ahmedhub (https://www.ahmedhub.us/gameloop/)
delete post; before ' delete opp ;
This should fix your issue. If have any doubt you can ask me in the reply. (https://gbmod.net/download-gbwhatsapp-apk/)
genymotion break Techandpcs (https://www.techandpcs.com/)
Twestar.com (https://www.twestar.com/)
find quality writing like yours nowadays. I truly appreciate people like you!
Take care!!
Also visit my website FilmsTrendz (https://filmstrendz.com/)
Thanks for sharing this post. Keep posting more forum post.FOR MORE VISIT
Bsnl (https://bsnlspeed.in/)
TM (https://tmspeed.xyz/)
telstraspeed (https://telstraspeed.xyz/)
tmspeedtest (https://www.tmspeedtest.net/)
unifispeedtest (https://www.unifispeedtest.com/)
wowspeedtest (https://www.wowspeedtest.net/)
do share your opinion about the solution i shared.
I enjoyed your post, It helped a lot. Thank you for sharing such a nice post. keep sharing stuff like this in future. YoWhatsapp (https://gbwamod.com/download-yowhatsapp-apk/)
One of movie industry' most iconic faces Cameron Diaz left the sector after her final film performance in 2014's Annie. The retired starlet explained her departure to comic Kevin Hart in April 2021 while showing up on his Peacock talk show Hart to Heart.
It is a family of 3500+ professionals that take pride in their work. We believe that dreams deserve to be accomplished.
And we have crafted a secure, agile, and customizable logistics network to help you achieve your goals.
<a href="https://usguncenter.com/product/blackhorn-209-black-powder/"rel="dofollow">blackhorn 209 powder for sale</a>
<a href="blackhorn 209 powder for sale"rel="dofollow">beretta 92 threaded barrel</a>
<a href="https://usguncenter.com/product/beretta-1301/"rel="dofollow">beretta 1301 tactical for sale</a>
<a href="https://usguncenter.com/product/beretta-92-threaded-barrel/"rel="dofollow">beretta 92fs threaded barrel</a>
<a href="https://usguncenter.com/product/hodgdon-trail-boss/"rel="dofollow">trail boss powder</a>
<a href="https://usguncenter.com/product/hodgdon-h1000/"rel="dofollow">h1000 powder</a>
<a href="https://usguncenter.com/product/beretta-1301/"rel="dofollow">beretta 1301 tactical gen 2</a>
<a href="https://usguncenter.com/product/beretta-brx1/"rel="dofollow">beretta brx1</a>
<a href="https://usguncenter.com/product/manurhin-mr73/"rel="dofollow">manurhin mr73 us distributors</a>
<a href="https://usguncenter.com/product/imr-4198-smokeless-gun-powder/"rel="dofollow">imr 4198</a>
<a href="https://usguncenter.com/product/benelli-montefeltro/"rel="dofollow">benelli montefeltro camo</a>
<a href="https://usguncenter.com/product/manurhin-mr73/"rel="dofollow">manurhin mr73 for sale</a>
<a href="https://usguncenter.com/product/beretta-92a1/"rel="dofollow">beretta 92a1</a>
<a href="https://usguncenter.com/product/manurhin-mr73/"rel="dofollow">mr73 for sale</a>
<a href="https://usguncenter.com/product/manurhin-mr73/"rel="dofollow">manurhin mr73 surplus</a>
<a href="https://usguncenter.com/product/beretta-1301/"rel="dofollow">beretta 1301 for sale</a>
<a href="https://usguncenter.com/product/beretta-92-threaded-barrel/"rel="dofollow">92fs threaded barrel</a>
<a href="https://usguncenter.com/product/beretta-apx-a1-2/"rel="dofollow">beretta apx a1</a>
<a href="https://usguncenter.com/product/hodgdon-h1000/"rel="dofollow">hodgdon h1000</a>
<a href="https://usguncenter.com/product/beretta-92-threaded-barrel/"rel="dofollow">beretta threaded barrel</a>
<a href="https://usguncenter.com/product/beretta-apx-threaded-barrel-9mm-bbl-125mm/"rel="dofollow">beretta apx threaded barrel</a>
<a href="https://usguncenter.com/product/imr-4227-smokeless-gun-powder/"rel="dofollow">imr 4227</a>
<a href="https://usguncenter.com/product/beretta-brx1/"rel="dofollow">beretta brx1 price</a>
<a href="https://usguncenter.com/product/hodgdon-h1000/"rel="dofollow">hodgdon h1000 in stock</a>
<a href="https://usguncenter.com/product/beretta-92-threaded-barrel/"rel="dofollow">beretta m9 threaded barrel</a>
<a href="https://usguncenter.com/product/beretta-92-series-3rd-gen-inox-stainless-steel-extended-threaded-barrel-9mm/"rel="dofollow">beretta 92fs threaded barrel stainless</a>
<a href="https://usguncenter.com/product/hodgdon-h1000/"rel="dofollow">h1000 for sale in stock</a>
<a href="https://usguncenter.com/product/blackhorn-209-black-powder/"rel="dofollow">blackhorn powder</a>
<a href="https://usguncenter.com/product/mr73/"rel="dofollow">manurhin mr73 sport</a>
<a href="https://usguncenter.com/product/hodgdon-trail-boss/"rel="dofollow">trail boss powder in stock</a>
<a href="https://usguncenter.com/product/beretta-a300/"rel="dofollow">a300 beretta</a>
<a href="https://usguncenter.com/product-tag/209-primer-caps/"rel="dofollow">209 primer caps</a>
<a href="https://usguncenter.com/product/cci-11-percussion-caps-box-of-1000-10-cans-of-100/"rel="dofollow">#11 percussion caps</a>
<a href="https://usguncenter.com/product/hodgdon-varget/"rel="dofollow">varget in stock</a>
<a href="https://usguncenter.com/product/imr-4198-smokeless-gun-powder/"rel="dofollow">imr 4198 powder for sale</a>
<a href="https://usguncenter.com/product/hodgdon-h1000/"rel="dofollow">h1000 powder in stock</a>
<a href="https://usguncenter.com/product/hodgdon-trail-boss/"rel="dofollow">trail boss powder for sale</a>
<a href="https://usguncenter.com/product/beretta-a300/"rel="dofollow">beretta a300 outlander</a>
<a href="https://usguncenter.com/product/hodgdon-longshot-smokeless-gun-powder/"rel="dofollow">longshot powder for sale</a>