Question is it possible to get the parent folder data eg(Title, Custom Columns)?

What I want to achieve is when an user add an item i could pre-populate columns with data i want.

I've manage to create this in ItemAdded so basically i need to get the ItemID so i could get the parent folder but since i need to do this in ItemAdding the ItemId still doesn't exist.

Is there any way i could get the parent folder data using the ItemAdding Remote Event Reciever?


1 Answer 1


In ItemAdding event recievers should be parent folder like this:

public override void ItemAdding(SPItemEventProperties properties)

       //file doesn't exist, but here is the parent folder
       SPFolder f = properties.Web.GetFile(properties.AfterUrl).ParentFolder;

       //you can work with this property
       if (string.IsNullOrEmpty(f.ParentFolder.Url)
            //code for populate columns


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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