354 reputation
316
bio website
location 6
age
visits member for 4 years, 3 months
seen Mar 31 at 19:34

"Being an Alice in the world of computing can be a very problematic position."

I'm a Community Manager for the Stack Exchange Network. I look forward to working with you on improving this community. ♪

On the offside: programmer/designer with a Computer Science degree and an electronic media degree. Enjoys gaming and does designwork as a hobby. Formerly employed as a full-time SharePoint developer in a WSS 3.0 environment.


Aug
2
comment How do I fetch the attachments from an AttachmentsField control?
I mimicked that in the past, but that just gets you the control. It doesn't really explain how to get the attachments from the control.
May
27
comment How do I fetch the attachments from an AttachmentsField control?
No, I would like to retrieve the list of attachments of the current list item as rendered in the AttachmentsField control. Attachments on the SPListItem doesn't update until the form is submitted, and I can't submit that data to update the attachments if I can't properly read the AttachmentsField control.
May
26
comment How do I fetch the attachments from an AttachmentsField control?
@Chris Currently? C# server-side. I'm open to anything that'll prevent me from having to create my own pseudo-AttachmentsField control as a workaround for this edit form.
May
26
comment Validation on page load treats SharePoint field controls as empty
Tried this in conjunction with Dave's answer to see if I could hit the DateTimeControl, but it didn't take. However, switching it to OnPreRenderComplete did successfully hit those, so that seems to do the trick.
May
26
comment Validation on page load treats SharePoint field controls as empty
This did the trick... sorta. Only works if I use the built-in UserField and DateTimeField controls, but it doesn't work with the bare DateTimeControl. Which is curious, but in general unimpactful since I'm preferable to the former in the first place. Thanks, both for the answer and the better tip for common practices.
May
23
comment How do I set a list to not be valid for search through the object model?
So simple, and yet so easy to overlook because all of the documentation seems to go all the way to avoiding the word "Search" on a setting that, in the UI, only says "Search".
May
19
comment How do I set a list to not be valid for search through the object model?
I want to stop 1 specific list that's deployed on each site. It's a single list that's used purely as a lookup table. The rest of the stuff we do need to be searched, I just don't want all of the lookup table stuff showing up amidst the results (which they do, currently, should I not disable it).
May
19
comment How do I set a list to not be valid for search through the object model?
Quite, it's also across multiple site collections and new collections that will be deployed in the future. It's something I'd really like to enable as part of the automated portion of the deployment.
May
13
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
Hm... I'll try that instead, and treat that as your answer. Though, if it turns out to solve the problem, you'll need to revise your answer to reflect the contents of your comment here. ♪
May
13
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
I'd like to see those references, because my recollection is that SPContext is guaranteed to be the current user, while generating a new SPSite inside of RunWithElevatedPrivileges is supposed to be created under the admin privileges, not the current user (if created outside of RunWithElevatedPrivileges, it would indeed use the current user). I'll give it a shot, though. Next time we run into the situation, I'll see if it works better.
May
13
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
@DaveWise The removal of the statement still yields the Access Denied error, therefore I find that to be verification that the Access Denied is not caused by the update statement, but something else that I am still unaware of.
May
13
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
@DaveWise On your advice, I double checked the necessity of those update statements, and have since removed them from the code. However, the error is still being returned.
May
13
comment Is it necessary to call SPWeb.Update() after setting AllowUnsafeUpdates?
Thanks for the quick response! I should go fix all those erroneous Updates, then. Unfortunately, though, this still didn't fix my non-permitted uploads...
May
13
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
No go. I've tried both the fewer arguments on SPFileCollection.Add(), and then adding also the swap to use l.RootFolder, and neither worked. Thanks for the suggestion, though.
May
9
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
@Anders Good point. I assume that in the "finally" block, you disable AllowUnsafeUpdates? I think I did that normally, but slightly phased out of it when I started declaring SPWeb objects in using statements instead of disposing during the try/finally.
May
9
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
@Dave That sounds kinda like an answer, if you knew what I could do to avoid that.
May
9
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
@Dave Mostly out of not remembering whether I have to call web.Update() after changing the value of web.AllowUnsafeUpdates (which is set to true before the upload, then set back to false). I figured that it'd be safer to call the updates than to assume that changing the boolean alone was enough.
May
9
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
I will try this variant out. Next time we run into the situation, we'll see if it works out.
May
9
comment Cannot upload to a permissions-enabled document library even with RunWithElevatedPrivileges
For the curious, GetSPUser just extracts the SPUser from an SPUserValue that has a user, while NonfiringUpdate is just a System.Update(false) inside of the DisableEventFiring of an event receiver template. Everything else is just normal functions and ideally intuitive variable names.
May
6
comment Origin of different styles of ID numbers for recurring Calendar events
Ooh, I see. So, basically, until it gets modified, it'll be the timestamp of the recurrence, but once it gets modified, it then gets treated as its own ID (32, in this case), and it consequently uses a notice of the root (3) instead of the timestamp. This is enlightening. Makes it a pain to try and figure how best to avoid links breaking, but definitely a step forward. Thank you much!