FavoriteShyam Sundar (OMNIYAT) asked in #ApexMay 9, 2019, 7:41 AMInsert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, invalid parent id: [ParentId] Error is in expression '{!createOffer1}' in page offermatrix: Class.offerExtension.createOffer1: line 329, column 1326: offer__Share offerShare=new offer__Share(); 327:offerShare.userorgroupid =[Select id from user where id=:userinfo.getuserid()].id; 328: offerShare.AccessLevel = 'Edit'; 329: insert offershare; 2 answersSortSort by DateSort by Most HelpfulSort by DateLoad more comments...Radhika Chereddy (Salesforce)Mar 22, 2021, 10:23 AMHi Shyam,You need to pass the Recordid as the parentId.Add a commentWrite an answer...BoldItalicUnderlineStrikethroughBulleted ListNumbered ListAdd linkCode blockInsert imageAttach filesLink URLCancelSave0/9000Reply
Radhika Chereddy (Salesforce)Mar 22, 2021, 10:23 AMHi Shyam,You need to pass the Recordid as the parentId.