Friday, October 29, 2010

Using SharePoint Custom Application pages as SharePoint List Forms

I was surprised to know that I can develop a SharePoint custom application page that can be used as one of the SharePoint list forms (NewForm.aspx, EditForm.aspx and DispForm.aspx). This can be done by writing a custom list definition. The code snippet is as follows.

<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url"&gt;

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

<Display>_layouts/ProjectName
/Ticket List Forms/TicketsDisplayForm.aspx </Display>

<Edit>_layouts/ProjectName/Ticket List Forms/TicketsEditForm.aspx</Edit>

<New>_layouts/ProjectName/Ticket List Forms/TicketsNewForm.aspx</New>

</FormUrls>

</XmlDocument>

</XmlDocuments>

Where TicketsDisplayForm.aspx, TicketsEditForm.aspx and TicketsNewForm.aspx are SharePoint custom application pages deployed to layouts folder.

If we place this snippet in the list definition,and when we click on "New Item" button on the list it will open SharePoint custom application page "TicketsDisplayForm.aspx". In this case we have to handle all the operations like inserting list items in to the list by ourself. You might me wondering why I have to do this? I had to do this since everyone on this list has read-only permission and List item insertion is done by using impersination. We have to take this route since the system is designed to work on role based.

3 comments:

  1. Nice Blog have a good content and give us Informative knowledge.i share some information about the bespoke business software development. Bespoke software application. is much better than normal software you buy over the shelf, because it is written to address the particular needs of the client. Bespoke software is user friendly because it works the way the client needs it to work. get more information about this click on this link
    bespoke business software development

    ReplyDelete
  2. To be able for a company to be effective, workers must be able to work together and cooperate together. Sharepoint is the technological innovation that can help them successfully connect amongst one another, removing many of the different issues that companies experience. There are many benefits to dealing with Sharepoint as a main custom application development system. Thanks for the blog which provides excellent information.

    Custom Application Development

    ReplyDelete