Loading...

Sunday, March 10, 2013

How To Deploy Custom List Forms With Data Form Webpart?

To Deploy list instances along with Custom New/Edit/Display Form, You can follow these steps
1)In SharePoint Designer
 Select  List and Librararies --->Preview Custom Forms in Browser-->Edit this Page in browser
 and export the DataForm Webpart

2)Edit the .Webpart file in Visual studio to remove  parameters for WebUrl (ctrl F +search for Weburl and remove it)
replace all occurrence of ListID to ListName and the Guid with the Name Of the List
and save .webpart file
In Webpart Properties remove ListName Property

3)Upload this Deployable Datformwebpart and Edit the Custom List Pages to Add this new Webpart
 and Remove the existing one.
In Visual Studio, Create the Module under ListInstance folder to provision Custom Form
(You can get this module from exported wsp to Visual studio of required site template which is saved as wsp)
Open the elements.xml file of the module and replace the CData of Dataform Webpart obtained in step 2
(If you need additional help , pls drop a comment)

4)Now to Deploy with ListInstance Follow the steps given here

After reading this artical I found that, Dataform Webpart will not work as it depends on List Guids

Also Check this url, which dynamically replaces tokens with Guids and custom pages are the sites pages

Create an Item in an External List on the Server

1)While creating ListItem in an external List
you must have visited this msdn How to

2)Have you come across this error for Authenticated users?
Failed to create a list item for this external list based on the Entity (External Content Type) 'ECT' in EntityNamespace '/sites/test space'. Details: Credentials were not found for the current user within the target application 'ECT'. Please set the credentials for the current user.

3)Edit the external Content Type,and make sure in Connection properties ,Authentication mode is selected to 'BDC Identity'