• Decrease Text SizeIncrease Text Size

Copy Module Designer records from one site to another.

Posted Date: 5/2/2023
    Printer Friendly Version   Email A Friend   Add This   Increase Text Size   Decrease Text Size

This example as obsolete due to the ability to import Module Designer records using Data Transfer.





Warning: This requires advanced knowledge of SQL and Centralpoint.

1. This example is for the team of developers who using different sites as their development playground and want to move module designer records from those sites into the main development website.
Create a Backup of the Destination Database.
2. In SQL Management Studio or any other SQL editor software copy the following SQL and modify it accordingly. This SQL assumes that this record doesn't exist in your Destination Database.


INSERT INTO DESTINATION_DATABASE.dbo.cpsys_ModuleViews 
SELECT * FROM SOURCE_DATABASE.dbo.cpsys_ModuleViews WHERE SystemName='SYSTEM_NAME_OF_YOUR_NEW_MODULE_DESIGNER_RECORD'


3. Navigate to your Destination Website Console. Then click on Site Architecture > Module Designer. Find copied record open it and click Save. This will create ASP.NET pages for this module.
Example:
Let's assume you have a Module Designer record with the SystemName of 'Articles'. In order for you to move that records from your cpweb_Development_Clone1 Website INTO the cpweb_Development website. You can run the following SQL

INSERT INTO cpweb_Development.dbo.cpsys_ModuleViews
SELECT * FROM cpweb_Development_Clone1.dbo.cpsys_ModuleViews WHERE SystemName='Articles'

*Module Designer record with SystemName of 'Articles' must not exist in the cpweb_Development database.
If the Module Designer record with SystemName of 'Articles' already exists and you need to update that record you can call the following UPDATE statement.

UPDATE cpweb_Development.dbo.cpsys_ModuleViews
SET cpweb_Development.dbo.cpsys_ModuleViews.Attributes =(SELECT cpweb_Development_Clone1.dbo.cpsys_ModuleViews.Attributes FROM cpweb_Development_Clone1.dbo.cpsys_ModuleViews WHERE SystemName='Articles')
WHERE cpweb_Development.dbo.cpsys_ModuleViews.SystemName='Articles'




* You must remember to submit this module designer record each time you copied.






Related Taxonomy

Comments:

Be the first to leave a comment.
Please Login to post comments.