I usually found that display names and internal names in SharePoint appeared differently. I found that a space on the display name would be replaced by _x0020_ in the internal name. Likewise a ':' would be replaced with _x0030_
Usually when i was switchin between the 2 in code references, i would do a String.Replace to do the conversion....
if only i had seen this post ages ago!!!
SharePoint 2010 escape characters
Monday, 18 July 2011
SharePoint and _x0020_ ??
Labels:
c#,
escape characters,
sharepoint 2010
File Modified Error
After months and months and MONTHS of trying to find a solution to the dreaded ' file has been modified by SHAREPOINT\system ..' when using an event receiver in the ItemAdded event, im happy to announce that I have finally got rid of it!!The way in which i did, which initially i thought was impossible or didnt work, was by doing it all in the ItemAdding event and using the after properties.
These 2 links here we key after reading them properly again
SharePoint List Item
SharePoint fill fields
These 2 links here we key after reading them properly again
SharePoint List Item
SharePoint fill fields
Labels:
BCS column,
c#,
File has been modified by,
sharepoint 2010
Sunday, 3 April 2011
Developing Advanced User Experiences
Some useful tips I picked up at the 2011 SharePoint Conference (Wellington) was on how to create advanced user experiences. This would include creating custom pages/controls with the SAME standard SharePoint look and feel. e.g.
would create a custom tool bar button with the default SharePoint look and feel. The following are the main references you would need on your custom page to make the controls work and render:
<%@ Register TagPrefix="wssuc" TagName="ToolBar" src="~/_controltemplates/ToolBar.ascx" %> <%@ Register TagPrefix="wssuc" TagName="ToolBarButton" src="~/_controltemplates/ToolBarButton.ascx" %> <%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %> <%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %> <%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
Labels:
customizing pages,
sharepoint 2010
Sunday, 27 March 2011
"File has been modified by..." errors
I used to get this error message frequently when working with event receivers (typically for document adding), now there are various possible situations that might cause this error(system.update(false)) etc but i found that in my situation, checking the version level of the ListItem helped remove these errors:
e.g.
e.g.
if (oItem.Versions[0].Level.ToString().Equals("Published") )
Labels:
c#,
File has been modified by,
list Item Versions
Getting a BCS Column related field name
Whilst some people might go through the process of using an XML parsing to get the RelatedField static name for a BCS Column(typically to set it e.g.) :
SPField tagField = oItem.Fields["Account"]; XmlDocument xml = new XmlDocument(); xml.LoadXml(tagField.SchemaXml); String sEntityName2 = xml.FirstChild.Attributes["RelatedFieldWssStaticName"].Value;I think a more quicker and efficient way is to do the following :
tagField.RelatedField.ToString();
Labels:
BCS column,
c#,
sharepoint 2010
Subscribe to:
Posts (Atom)