How to get a calculated field with modify date, when one field or column changes in the share point list.
For example, If I have a field status, i should get a modify field populated with today's date whenever I change the status field. The date column should not change in case of changes in the other column other than status column.
Please help me ...
UPDATE Event Reciever code I tried..
public override void ItemUpdating(SPItemEventProperties properties)
{
string currentStatus = properties.ListItem["Status"].ToString();
string newStatus = properties.AfterProperties["Status"].ToString();
if (currentStatus != newStatus)
{
SPListItem oItem = properties.ListItem;
oItem["Last Modified"] = "Hi";
oItem.Update();
}
}
Element.xml
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="120">
<Receiver>
<Name>EventReceiver1ItemUpdating</Name>
<Type>ItemUpdating</Type>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<Class>StatChange.EventReceiver1.EventReceiver1</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
</Receivers>
</Elements>
ListTemplateId="120" (Because - List is of type DataSheet List).
However getting a conflict like - Rows you changed were previously changed by (My User Name) on ...... Your chnages conflict with that users change.
This I believe because of the update command in the Reciever. How can I get rid of this - Though the column 'Last Modified' is populating correctly ....