In our project we got a requirement to migrate shares of personal views. We all know that share information will be stored in “principalobjectaccess” table. I faced couple of issues while migrating this data and I want to share this information here.
Issue 1: You can’t share a personal view owned by other user. To solve this issue, Kingsway soft provided a field called “impersonateas” which should be mapped to owner of the personal view (you can get this information by join the userquery table with POA table). So that the share request will be executed under owner context.
Issue 2: After Issue 1 is fixed we faced another weird issue that the package is only processing only 1 share in target instance irrespective of no.of records from the source. After a bit of research, we identified this is because of the “Batch Size”, after changing the batch size to 1 with out any threads it processed all the records from the source. I hope it is because of the impersonation we are using in the package.
I hope this information helps some one who wants migrate sharing information of persona views/charts/dashboards.