none
WebPartConnection in Elements.xml provisioned, but not working RRS feed

  • Question

  • Hello,

    I have the following code at the bottom of my Elements.xml, which provisions a File (Page, with web parts on it)

    			<WebPartConnection ID="myConnectionId1"
    												 ProviderID="WPPathProvider"
    												 ProviderConnectionPointID="DFWP Row Provider ID"
    												 ConsumerID="WPPathConsumer"
    												 ConsumerConnectionPointID="DFWP Parameter Consumer ID">
    				<WebPartTransformer Assembly="Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages">
    					<![CDATA[<WebPartPages:TransformableFilterValuesToParametersTransformer ConsumerFieldNames="RootFolderCustomParam" ProviderFieldNames="LinkFilename" />]]>
    				</WebPartTransformer>
    			</WebPartConnection>

    When the page with the web parts on it is provisioned, seems like the connection is provisioned also, because when I Edit the page, I see that the Connection context menus of the web parts point to each other. So, in the UI it seems like the connection works. However, the provider web part does not provide data to the consumer, until I click on the created connection and in its popup click 'Finish' (Not changing anything).

    What could cause the connection to provision, but not work until I click Finish in the popup? Where is the actual connection stored? Content database? Secure store? How do I possibly export a connection I have configured in the UI? I can't find it with SharePoint 2013 Manager tool, SharePoint Designer tool or any other.

    Saturday, May 16, 2015 9:52 AM

All replies

  • Hi Hristo,

    Per my understanding, you might want to connect two web parts on a custom page by modifying the Elements.xml.

    As a workaround, I suggest you connect the two web parts programmatically using C# with SharePoint Object Model instead.

    Here is a demo about how to provision and connect two web parts programmatically for your reference:

    http://ojasmaru.blogspot.in/2012/07/sharepoint-2010-programmatically.html

    Thanks 

    Patrick Liang


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    Monday, May 18, 2015 2:20 AM
    Moderator
  • Hi,

    Unfortunately, not an option, it's a no-code sandbox solution.

    Thanks,

    Hristo

    Monday, May 18, 2015 5:19 AM
  • Ok, can anyone point me at at least where this connection information is stored? I have noticed that it is version specific i.e. on the initial version of my page it doesn't work, then I 'fix' it by clicking the finish button and publish the page. The newly published page works fine. If I revert the version to the original, it doesn't work. So it's somehow stored along with the version of the page. Where can I find this?
    Monday, May 18, 2015 8:07 PM