tag:blogger.com,1999:blog-7130587409577087282.post1208867994264944765..comments2024-03-15T23:24:50.847+11:00Comments on David Klein's Corner: SharePoint 2013 - Bug - Breaking Role Inheritance on Document Library Items within a Synchronous ItemAdded Item Event Receiver will always generate an exception when not a Site Collection Administrator (e.g. a Site Owner) - FixDavid Kleinhttp://www.blogger.com/profile/13657389334766989234noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-7130587409577087282.post-55204602207100077142017-05-19T19:27:52.682+10:002017-05-19T19:27:52.682+10:00Greate post. It saves a ton of time.
ThanksGreate post. It saves a ton of time.<br />ThanksTrịnh Tuấn Túhttps://www.blogger.com/profile/03795052495075523723noreply@blogger.comtag:blogger.com,1999:blog-7130587409577087282.post-14725577275054024472016-04-08T02:26:38.906+10:002016-04-08T02:26:38.906+10:00Hi David,
I am going through the same issue. I cr...Hi David,<br /><br />I am going through the same issue. I created an synchronous event receiver of Item updated event in document library. Whenever we create a subsite and update document it not breaking the permissions and giving the below error for first document only. For second document updates its working fine. I tried to debug the code but didn't helped much. Any help is greatly appreciated.<br />Specified argument was out of the range of valid values. Parameter name: index0. <br /> at Microsoft.SharePoint.Utilities.SPChunked2DObjectArray.get_Item(Int32 index0, Int32 index1) <br /> at Microsoft.SharePoint.SPListItemCollection.CopyRow(SPListItemCollection srcListItems, Int32 iSrcIndex, Int32 iDestIndex) <br /> at Microsoft.SharePoint.SPListItem.EnsureItemIsValid() <br /> at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException) <br /> at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowIfValueMissing, Boolean bThrowIfFieldMissing) <br /> at Microsoft.SharePoint.SPListItem.get_File()Anonymoushttps://www.blogger.com/profile/02227358153381806978noreply@blogger.comtag:blogger.com,1999:blog-7130587409577087282.post-5827911841481846682015-07-20T17:53:45.087+10:002015-07-20T17:53:45.087+10:00Hi David,
I am observing similar behavior with sy...Hi David,<br /><br />I am observing similar behavior with synchronous ItemUpdated event, but I don't have check out / check in enabled with my document library. Can I still apply your workaround?<br />The SaveItem screenshot contains code with SPUtility.IsCheckedOut(item) condition. Does that apply to libraries without check out enabled?<br />I've also isolated BreakRoleInheritance code and wrote my test event receiver. I noticed that on newly created document library instances the event receiver doesn't throw any exceptions and works fine.<br />I've also raised a support incident with Microsoft, it's taking them days and they still haven't back to me.<br />Thanks for your post, you are the only one in the whole Internet to spot and report this very annoying bug.botandenhttps://www.blogger.com/profile/11788376994836739097noreply@blogger.com