Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

How to programmatically create catalogs

Vote:
 

Is there a way to create catalogs programmatically? 

Regards
Sandra 

#50187
Apr 15, 2011 12:59
Vote:
 

No worries, I found it :P

CatalogDto cat = CatalogContext.Current.GetCatalogDto();
cat.Catalog.AddCatalogRow("testCatalog", DateTime.Now, DateTime.Now.AddYears(10), "sek", "kgs", "en-us", true, true, DateTime.Now, DateTime.Now, null, null, 0, AppContext.Current.ApplicationId,null);
CatalogContext.Current.SaveCatalog(cat);

 

#50188
Apr 15, 2011 13:32
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.