Need synchronization for Custom Module data

Namita Patil asked on March 10, 2021 22:50

Hi,

We have one user requirement where we need to synchronize the custom module data to next environment but only for specific custom module not all the custom modules. Is there any way to achieve this in Kentico 12?

Thanks, Namita

Correct Answer

Liam Goldfinch answered on March 11, 2021 01:35

Hi Namita,

For each Class in the Module you want to enable synchronization for, you need to configure the type definition by enabling content staging. The documentation describes how to do this.

But essentially you need to copy the Code of the class into your project and then you can configure it by adding:

SynchronizationSettings =
{
    LogSynchronization = SynchronizationTypeEnum.LogSynchronization,
    ObjectTreeLocations = new List<ObjectTreeLocation>()
    {
        // Adds the custom class into a new category in the Global objects section of the staging tree
        new ObjectTreeLocation(GLOBAL, "Custom")
    },
},
0 votesVote for this answer Unmark Correct answer

Recent Answers


Namita Patil answered on April 3, 2021 02:19

Thanks a lot! Great help! Functionality works :)

Namita

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.