Tag Info

Hot answers tagged

7

That could be due to localization. In that case, you should also set TitleResource property: field.TitleResource.SetValueForUICulture(new CultureInfo(1033), "My title"); Actually, I've done renaming of Title plenty of times, and I can't see any difficulties there. Your SchemaXml approach probably didn't work for the same localization reason. By the way, ...


4

This sort of task is more suited to an event receiver. The itemAdded approach will certainly give you access to the ID. An event receiver does not have the typical delay you see with Workflows, it fires right away. One issue you can experience with ItemAdded events is that they run asynchronously. What this means is that the control is returned to the UI ...


4

Because you are uploading a file to an Asset Library, right after clicking "upload" you are shown the edit form, in order to fill some metadata that the library requires. Now, the ItemAdded event (which is *asynchronous *) is probably too early to try to change any of the file properties. I tried your code inside the ItemUpdated event and it worked ...


4

It is because SharePoint Multilingual User Interface (MUI) translates also column titles. What you did was that you overrode the default English MUI translation of the Title field to "title123". However, when you switch over to German MUI, it will use the German default translation of the Title field. You would need to change it also on the German MUI side. ...


2

I only tried this in PowerShell, where I can confirm that SetValueForUICulture() doesn't persist the value (or rather it looks like it is set in the database, but GetValueForUICulture() retrieves the old value even though the internal property ResxBased is set to false). What worked for me was to not use SetValueForUICulture() but instead set the title ...


2

You need PowerShell to rename the Content Type on the specific list. I have written down a snippet for you that works on a specific list and update the Content Type name. You can extend it to for the other lists etc. $siteUrl = "http://YourServerName/sites/testsite" [system.reflection.assembly]::LoadWithPartialName("Microsoft.Sharepoint") > $null #get ...


2

It seems to me that, while you can't delete the Name field, you could hide it in the edit form using jquery. There are a lot of articles on how to do this. Then you are right, you would need a way to populate it anyway, and I'm not sure an event receiver would work. Perhaps if it was on the "ItemAdding" event.


2

Rename the server at the operating system level by using the System Properties dialog box in Control Panel. Restart Server   Change or create SQL alias (If no ALIAS, create one to point to the old servername so it finds the SQL Server that is on the same server, stand-alone installation.) using cliconfg Restart the server   Run PowerShell-command to rename ...


1

Are you sure you are not re-firing your own event? You can disable event firing on update like this: EventFiringEnabled = false; // file.Update(); EventFiringEnabled = true; This link is for 2010, but it should still be valid for 2013: http://adrianhenke.wordpress.com/2010/01/29/disable-item-events-firing-during-item-update/


1

I recently have a similar requirement. I needed to rebrand a proof of concept into a well named product. I wrote this script to handle most of the job: $root = Get-Item C:\Projects\ $allFolders = Get-ChildItem $root -Recurse -Directory | Sort-Object FullName -Descending $allFiles = Get-ChildItem $root -Recurse | ? { -Not $_.PSIsContainer} | Sort-Object ...


1

Try the actual STSADM Command renameWeb (for the actual sub-site - http://technet.microsoft.com/en-us/library/cc263508(v=office.12).aspx) or renameSite (for a site collection - http://technet.microsoft.com/en-us/library/cc263038(v=office.12).aspx).


1

I would suggest to rather execute your code in the ItemAdded. Do not try to re-create another item inside, you just need to execute the code at the appropiate moment. Make sure you read this article to understand when the AfterProperties has values populated as it is different from List to Library and for each Event ...


1

Create a new document. Paste in the contents from v1, Save and publish as a major version. Repeat for versions 2 and 3. You'll have the correct content version history but not who and when. There isn't a method I know of to merge and retain the information. Maybe the more code savvy folks have a way to do it programmatically that will do what you ...



Only top voted, non community-wiki answers of a minimum length are eligible