开发者

Replace standart DispForm with my application page for External Lists

开发者 https://www.devze.com 2023-02-22 12:07 出处:网络
I\'d like to use my application pages (with code behind, not modified with Sharepoint Designer pages) for View/Edit/New operations.

I'd like to use my application pages (with code behind, not modified with Sharepoint Designer pages) for View/Edit/New operations.

As I know there is an issue how to do it:

SPContentType ct=web.Lists["List开发者_JAVA百科Name"].ContentTypes["ContentTypeName"];
ct.EditFormUrl="_layouts/youreditpage.aspx";
ct.Update();

And this works correctly for common Lists, but when I'm trying to do it with External List,

I have an Exception on Update method:

SPException: The collection cannot be modified

I've tried:

web.AllowUnsafeUpdates = true;
//or
ct.ReadOnly = false;
// or
ct.Sealed = false;

and nothing of it helped me...

I've tried to modify Allow management of content types property in the library settings but I cannot find this property with external lists. Please I need help, thanks!


You should be able to use a custom form for your external list / external content type like you would for any other list. Here are some pointers specific for external lists:

  • How to: Customize External List Forms Using Microsoft InfoPath
  • How to associate Custom Form with External List?


I know it's too late to response but I just wanna share here for later reference, for guys who have no idea how to custom form for External List by using Visual Studio.

I was google a lot to custom the (Display, Edit, New) forms for External List but there was nothing can help me to fully customize and replace default forms by application pages. However, by combining few approachs I can fully custom forms for BCS External List.

This guidance is based on this great article which show you how to customize form for normal SP lists. Please have a look on this google doc file: https://docs.google.com/file/d/0BwAyIaJP8PKxeUxBV20tcW1wX28/edit?usp=sharing&pli=1

0

精彩评论

暂无评论...
验证码 换一张
取 消