I createad an application page and put it under /_layouts/, in the list definition I specified the edit form like so:

<FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">

This updated the edit form to my application page when I had set Deployment Conflict Resolution: Auto on my list which deleted the list and recreated it.

I now have data in the same list in a different farm and I have to set Deployment Conflict Resolution to None. When I deployed this to the other farm the list kept is default edit form and I figured I have to change the form pro grammatically.

I created a feature with a feature receiver and added some code:

public override void FeatureActivated(SPFeatureReceiverProperties properties)
    SPSite site = (SPSite)properties.Feature.Parent;
    var rootWeb = site.RootWeb;
    var myList = Utility.GetRootListByName("myList");
    myList.DefaultEditFormUrl = "/_layouts/myform.aspx";

However with this code I get Activate Features': Unable to find an SPForm matching URL /_layouts/myform.aspx

Should I be able to use an application page as edit form? I mean it works fine when I deploy the list definition for the first time.

Thanks in advance.

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.