Monday, February 22, 2010

dataform webpart escape from hardcoded GUID - the drawback

If in your lifetime you have ever tried to make dataform web part portable, probably you know that recommendation is:
switch all GUID to list name as it's said right here:
dataform webpart escape from hardcoded

But the main drawback in this approach:
You will not be able to open modified "such way" the web part in Sharepoint Designer.

So, it's time ,as always, for compromise - what do you want more - easy configurable or easy portable...

In case you want both - you have to implement feature which replaces hard-coded GUID with live ID in the environment.

Here is a real "how to do it" example- File provisioning: a hard-coded list id replacement