Hi Shashi,
Firstly, my apologies for the delay in reply.
Does your client use a single Project or small set of Projects to organize their Entities? If so, I believe I have come up with an effective solution. Please see the attached PTC.TS.UpdateOrgVisibility.Thing.It includes a Service called UpdateVisibilityPermissionsByProject. This service accepts the Source Organization, Destination Organization and a list of Projects to search for the Entities on. There are some caveats to mention with this approach:
- Currently UpdateVisibilityPermissionsByProject accepts a list of Projects
- It could easily be updated to fetch all Projects but this may not be necessary depending how the Entities that need to be updated are organized
- There may be a performance impact on the Platform while this is running
- It may take several seconds to complete depending on how many Entities need to be updated
- ScriptTimeout in platform-settings.json may need to be increased to accommodate this long running operation
- If the operation is taking an extended period of time you could try setting the Service to async
- This code is provided "as is"
- Recommended to execute this in a development instance that has a similar impacted Entity count to Production
- Doing so will help to understand the expected timings and potential impacts
If this is not feasible because of the potential performance impact or the Entities are strung across too many Projects you may be able to do a full export of all Entities in the system to an XML file using the Import/Export > Export option. Whether or not this is possible depends on two things:
- How many Entities are on this system?
- If there are thousands of Entities it may not be possible to generate an XML export for the entire system or the export may be too large to work with in a text editor
- Does the Organization name appear in any of the Services or Mashups?
- You will ultimately do a Find & Replace with the XML export, replacing the old Organization name with the new Organization name
- Given this, if the Organization name appears in other parts of the code or in Mashups replacing this value may have unintended side effects.
Hopefully this helps.