Reputation
850
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
22 43
Impact
~99k people reached

May
16
asked Is it possible to get detailed error messages in SharePoint Online?
May
16
comment How do I change the Title column of a list programmatically?
Just a final note: I ended up setting DisplayName in the SPField's SchemaXml directly. This did the job in my case, although I would assume that Per Jakobsen's technique would work in the general case.
May
15
accepted Feature activation suceeds in sandboxed server environment, but fails in SharePoint Online. How do I find what's wrong?
May
15
accepted How do I change the Title column of a list programmatically?
May
14
comment How do I change the Title column of a list programmatically?
Thanks very much. This is exactly the sort of info I was looking for. For some reason, though, the field just seems to stubbornly refuse updating. I can see the changes reflected in the object model, but there are still no traces on the List Settings page. Might just be something weird with my test farm.
May
11
comment How do I change the Title column of a list programmatically?
Since this whole thing seems pretty confusing, it's also worth mentioning that the debugger in fact verifies that the DisplayName has been updated. Both titleField.TitleResource.Value and titleField.Title are in fact "Firma" when my code is finished executing. There are just no traces of this in the web interface.
May
11
comment How do I change the Title column of a list programmatically?
The site and column was created just milliseconds before this code is executed, so I am confident that it hasn't been RENAMED...it might have been screwed up by the fact that I use a Norwegian site template, though. The last letters of the URL of the field indicates that it is still named "Title", but I get a runtime exception when attempting to change this property. See Paul's answer + comment and screenshot: i.imgur.com/jW0DB.png
May
11
comment How do I change the Title column of a list programmatically?
I am trying to change the display name. As I said above, the property has a different name in the Norwegian site template, so your code causes a runtime exception: i.imgur.com/jEguA.png. I was also under the impression that changing the InternalName or StaticName of the Title field was bad practice. Would it resolve my problem? Although come to think of it, SharePoint still indicates that the internal name of the field is "Title". So I don't see WHY your code should fail. [Exception translation: Cannot find field with name "Title"]
May
10
revised How do I change the Title column of a list programmatically?
Added code to emphasize that I also update the list
May
10
comment How do I change the Title column of a list programmatically?
Yes, I am calling Update on the list immediately afterwards. I'll update the question to emphasize this.
May
10
comment How do I change the Title column of a list programmatically?
Note that attempting to change the value with 'Fields["Title"]' results in a runtime error.
May
10
asked How do I change the Title column of a list programmatically?
May
9
answered Feature activation suceeds in sandboxed server environment, but fails in SharePoint Online. How do I find what's wrong?
May
9
comment Feature activation suceeds in sandboxed server environment, but fails in SharePoint Online. How do I find what's wrong?
Okay, turns out the error in my last comment was caused by an unrelated error. I've done some more testing, and the code seems to fail pretty randomly - if I comment out broad sections of code, it sometimes works and sometimes it doesn't. I've increased the resource quota of the site collection to the maximum, but this doesn't seem to improve things. Is there anything else that can cause this error message in SharePoint Online but not in a sandboxed server version?
May
9
comment Feature activation suceeds in sandboxed server environment, but fails in SharePoint Online. How do I find what's wrong?
Changing the Solution ID does not resolve the problem. But you might be onto something - it seems like my solution suddenly gets rejected by the Sandboxed Code Service if it involves any code at all. With an empty FeatureActivated method it deploys, but if it contains "using (SPSite aSite = new SPSite("targetSiteCollection"))", it fails. This didn't happen before.
May
9
asked Feature activation suceeds in sandboxed server environment, but fails in SharePoint Online. How do I find what's wrong?
May
2
accepted Why does the Timer Service stop due to incorrect login?
Apr
26
accepted What is a good approach for generating serial numbers in SharePoint Online?
Apr
25
answered Learn Sharepoint w/o having experience
Apr
25
comment What is a good approach for generating serial numbers in SharePoint Online?
And to think I've been working with SharePoint for a year and didn't remember this feature... The ID column might be the right choice, although it is specific to each list and hence can't be used site-globally. Might use a calculated column based on ID. Thanks.