Migrate, set property value in BlockBase to true

Vote:
 

Having implemented a property late in project, the default value should be True which is not the case atm. 

Would a migration step or a scheduled job (using Episerver.Find to find all blocks inheriting from that base type) and set the value to True, work best? 

Or any other suggestions? 

#323513
Jun 13, 2024 15:37
Vote:
 

Hi Jonas, the default values are set when creating new content.

Either approach will work for updating existing content. Refer to this previous post for more guidance. Migration step will run every time on site initialisation so you'll need logic to ensure the your content update code runs once only.

#323552
Jun 14, 2024 2:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.