How Does Kentico Create Custom Tables for BizForms ?

kentico guy asked on March 6, 2020 19:44

Are there any methods that are typically used to create tables from BizFormItem s? When our event (as in live events and webinars, not C# Events ;] ) pages are loading, Kentico is trying to find a form table that does not exist. Here is the method that Kentico is trying to use to get the object I'm referring to:

BizFormInfo form = BizFormInfoProvider.GetBizFormInfo("XXX_EventNode" + EventNodeGUID.ToString("N"), CurrentSite.SiteID);

I'm basically looking for possible methods that could be used to generate the table that the above object would be referencing.

From looking at all the other code I can't tell where or how the table is getting created. I've tried stepping through the code when I click "save" in the "pages" module; there is so much code running that I spent 15 minutes pressing F5/F10/F11 and eventually gave up going that route.

I could also settle for if anyone can tell me where people would typically add custom code when the "save" button is clicked in the "pages" module. I don't know if it's typical for kentico to be creating a new table for every new page that contains registration data.

I noticed that every time we create an event (+1 BizFormInfo), this custom instance of kentico creates a new table named Form_XXX_EventNode+(a Guid) but for some reason it's not creating them now after I added another macro method to our extension class. No idea why, because I didn't change any of the page module code at all. All I did was add a macro method and it was initially working then all the sudden when the pages load, Kentico can't find the table that was supposed to get created.

How are registration forms tables usually created in kentico? What happens when I click the save button in the pages module.

I know this is kind of confusing so I can provide more details if needed

Thanks!

Recent Answers


Brenden Kehren answered on March 6, 2020 20:20

What specifically are you looking for? Your question is all over the place. Do you know if there is any custom code? Where are you creating new records? In code or in the UI?

0 votesVote for this answer Mark as a Correct answer

kentico guy answered on March 6, 2020 22:56 (last edited on March 6, 2020 22:58)

We can start with:

if I were instantiating a BizFormInfo object using this code: BizFormInfo form = BizFormInfoProvider.GetBizFormInfo("XXX_EventNode" + EventNodeGUID.ToString("N"), CurrentSite.SiteID); ... what would you guess is the method used to generate that table?

This is an out of the box method and our project is using the stock DLL CMS.OnlineForms

I don't see those classes getting extended so I'm assuming this solution is using an out-of-the-box method to create that table seen above.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 6, 2020 23:01

The BizFormInfo class is used to get the definition of the table (table name, columns, form controls used for fields, etc). The BizFormItem class handles all the CRUD activities for the individual records of the biz form.

Check out this API documentation

0 votesVote for this answer Mark as a Correct answer

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