Migrating a page having Data View Web Part from one server to a different server
I got this issue while moving the lists with MetaLogix Migration Manager. It’s a very common issue I have seen people struggling with. Time to fix these issues increases if count of DVWP increases.
By default, SharePointDesigner binds the control to the list instance using the list instance GUID. To resolve this we need to replace the GUIDs by the list name.
The steps to do this are:
1) On the attributes of the DataFormWebPart element replace the attribute ListName="{GUID}" by ListName="LIST_NAME" where LIST_NAME is the name of the list that you are binding to.
2) Go through all of the DataFormParameter elements and replace: WebPartPages:DataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{GUID}"
With:
WebPartPages:DataFormParameter Name="ListName" ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="LIST_NAME"
3) Go to the ParameterBindings element and replace
ParameterBinding Name="ListID" Location="None" DefaultValue="{GUID}"
With:
ParameterBinding Name="ListName" Location="None" DefaultValue="LIST_NAME"
This should give you a GUID free DVWP that can be placed on a page layout used by multiple sites on your site collection (as long as the name of the list is the same on all sites).
Cheers!!!
I got this issue while moving the lists with MetaLogix Migration Manager. It’s a very common issue I have seen people struggling with. Time to fix these issues increases if count of DVWP increases.
By default, SharePointDesigner binds the control to the list instance using the list instance GUID. To resolve this we need to replace the GUIDs by the list name.
The steps to do this are:
1) On the attributes of the DataFormWebPart element replace the attribute ListName="{GUID}" by ListName="LIST_NAME" where LIST_NAME is the name of the list that you are binding to.
2) Go through all of the DataFormParameter elements and replace: WebPartPages:DataFormParameter Name="ListID" ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{GUID}"
With:
WebPartPages:DataFormParameter Name="ListName" ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="LIST_NAME"
3) Go to the ParameterBindings element and replace
ParameterBinding Name="ListID" Location="None" DefaultValue="{GUID}"
With:
ParameterBinding Name="ListName" Location="None" DefaultValue="LIST_NAME"
This should give you a GUID free DVWP that can be placed on a page layout used by multiple sites on your site collection (as long as the name of the list is the same on all sites).
Cheers!!!
1 comment:
have ever try to do an automation for this process
Post a Comment