Question

I made Event receiver ItemAdded. on this event i ll try to get Related field its always null. But in the display form is not null. please help -need this field, and then parent item.

    {
        base.ItemAdded(properties);
        if (properties.ListTitle == "Task")
        {

            try
            {
                SPListItem taskItem = properties.ListItem;
                object relitem = null;
                relitem ==taskItem[SPBuiltInFieldId.RelatedItems]
Était-ce utile?

La solution

Just to be sure, try to get the values from ItemUpdated event. Maybe the reason why that the values are not available is because they aren't exist yet.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top