Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

WebPart ID changes automatically on saving a copy of webpage?

  Asked By: Bob    Date: Mar 16    Category: Sharepoint    Views: 1123

We are facing a strange problem with webpart ID. We used "report center"
template to create a site and designed some reports on SQL Server
Reporting Services. Later we published SSRS reports on that sharepoint
site using "Report Viewer" webpart on a sharepoint page. We needed to
customize that webpage and hence wrote some javascript which uses the
webpart ID of "Report Viewer" webpart. Now, when we make a copy of that
webpage (for backup purpose) and then open the copy in browser, we see
following error:

Could not find the connection provider Web Part with ID

Upon investigation it turns out that the webpart ID changes
automatically everytime we make a copy. The same error appears when we
save the whole site as template and then use this template in another
sharepoint server (testing environment) to create a site. Actually this
is the method we are currently using to deploy our changes from
development to testing environment. So for every deployment we have to
open the webpage and update the new webpart ID in our javascript.

I don't understand why the webpart ID changes everytime. And Is there
any workaround for this so that we don't have to manually update our
javascript with new webpart ID?



No Answers Found. Be the First, To Post Answer.