Retrieve field value after ItemAdded event using its GUID

To retrieve the value of an item after the event ItemAdded , we can use the guid of the corresponding field.

 public override void ItemAdded(SPItemEventProperties properties)

            SPListItem currentListItem = properties.ListItem;
            Guid guid= new Guid("A1075591-DBC7-4b9d-99F4-E03061F7716E");
            string value = currentListItem[guid].ToString();


we can also use the Index of the field or the fieldname .

Enregistrer un commentaire