0

I have adding , updating event on a list along with added and updated. Everything works fine with new form and update form. But I switch to Quick edit , RER is not getting triggered. Is it something limitation on Quick edit? Any workaround on this. Added some part of business logic. So What I trying to achieve is based on user input , updating other fields. I am also pulling data from different list as well. So I can not replace this with calculated columns or any other out of box function.

    if ((properties.ItemEventProperties.AfterProperties["RandomColumn"].ToString() == null && !onEdit) || properties.ItemEventProperties.AfterProperties["RandomColumn"].ToString() == "")
    {
        result.ChangedItemProperties.Add("RandomColumn", "None");
    }
  • Are you using before after properties in RER? – Dikesh Gandhi Jun 30 '16 at 4:11
  • Yes , using after properties. – Bhaskar Dhone Jun 30 '16 at 4:14
  • 1
    Before-after properties will give you null in adding or added events in Office 365 in quick edit though it works like a charm in on-premise. If quick edit is not necessary then disable it. Please provide your code or case scenario so one can help you or give workaround suggestion. – Dikesh Gandhi Jun 30 '16 at 4:21
  • I will put code snippet in above question. So is it something limitation from Microsoft which says Quick Edit adding , after properties are null. – Bhaskar Dhone Jun 30 '16 at 4:25
1

Event Receiver will always trigger when we do inline editing for a list item.

In ItemUpdating of my event receiver class, I am using properties.AfterProperties['Field1'].But this 'Field1' column is not visible in my inline editing that makes the return value as null always and stops Aborting the event.

To overcome this issue,i just call the properties.ListItem['Field1'] (because this value is not changed in inline editing) for returning the actual value

Source.

ItemAdding is event firing before list item is added, so at this time SPListItem not exists yet. If you want to validate entered data, then use properties.AfterProperties["FieldInternalName"]

Source

Probably you were also doing the same mistake as I guess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.