How to add fields to EventAttendee

Andrey Kolodnitskiy asked on April 7, 2015 11:56

Hi

How custom fields can be added to the EventAttendeee class on Kentico 8.2?

I've tried multiple ways but those seem not to be working when Kentico is deployed on Azure

that way returns false and fields are not added http://bitwizards.com/blog/may-2013/how-to-add-event-attendees-using-the-kentico-cms-a

Kentico API seems to be changed from version 7 so it is not clear how to add those custom fields https://devnet.kentico.com/articles/events-as-products-in-kentico-7

Recent Answers


Dawid Jachnik answered on April 7, 2015 13:25

Hi Andrey,

Did you try to extend with your custom fields the EventAttendeeInfo class in Events module ?

3 votesVote for this answer Mark as a Correct answer

Andrey Kolodnitskiy answered on April 7, 2015 18:21

It is being inside of the compiled CMS.EventManager.dll so I cannot change it

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on April 7, 2015 20:49

You should be able to add the fields to the module. If its locked for some reason you can go into the class table and change the showassystemtable boolean to true. Then you can add the fields. If you can't rebuild the code for the class, usually you can access your added items by a GetValue method or something of the sort for, instead of accessing the field directly on the object.

0 votesVote for this answer Mark as a Correct answer

Andrey Kolodnitskiy answered on April 7, 2015 21:17

thanks for the try but as I mentioned in the topic description SetValue returns false and data is not stored. eventBooking module allows to extend event details but not event attendee. This is marked as not customizable. And CMS.Base does not contain methods which were available in Kentico 7

0 votesVote for this answer Mark as a Correct answer

Dawid Jachnik answered on April 8, 2015 10:27

So you can create another custom table and store there related data to your EventAttendee. After Saving the EventAttendeeInfo object you should save then your data with corresponding ID of EventAttendee, next you should make some extended provider to retrive both data in one object.

2 votesVote for this answer Mark as a Correct answer

Andrey Kolodnitskiy answered on April 8, 2015 13:55

yep that's what I'd done but then those fields aren't displayed in the EventManager module which allows to send invitation mails, display events and registered users and so on.

So I have to adjust that module as well in such case. Thus I am wondering is there simpler way of just adding those fields to EventAttendee and changing schema like it worked in previous versions.

It seems like no :(

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on April 9, 2015 02:57

Andrey,

You are correct with No there is not currently an easier way to do this. I have extended the Events Module extensively and a lot of it is very manual. There are even a few parts that are hard coded into the DLLs.

I have provided feedback to Kentico and hope maybe for more flexibility with version 9.

0 votesVote for this answer Mark as a Correct answer

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