Showing posts with label BCS column. Show all posts
Showing posts with label BCS column. Show all posts

Monday, 18 July 2011

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

Sunday, 27 March 2011

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();