Persisting Event Inquiries

Posted by Community Admin on 05-Aug-2018 16:30

Persisting Event Inquiries

All Replies

Posted by Community Admin on 25-Mar-2011 00:00

I have a calendaring system that displays events stored in Sitefinity.  One of my requirements is to allow users to inquire about these events.  I need some way to track these inquiries and keep them tied to their event, so when the event creator logs in, they can manage these inquiries.

I was hoping I could create a document library to store these inquiries, but since these inquiries are simply metadata and do not contain an actual file, they cannot be stored there.  I had also considered storing the inquiries as comments on the events, then creating a custom control to display these "comments" on the front end for the users to process the event inquiries.

What would be the best way of storing these event inquiries?  If using event comments is a viable solution, can you post a code snippet or provide resources on how to programmatically create/interact with comment objects?  I'm receiving "unsupported language" errors when trying to create and set properties on Comment objects.

Thanks.

Posted by Community Admin on 30-Mar-2011 00:00

Does anyone on the Telerik team have a proposed solution to handle this requirement on my client's project?

Thanks.

Posted by Community Admin on 30-Mar-2011 00:00

Hi Geoff,

 One of the option is creating  a custom module similar to Products Sample catalog available in the SDK. You will need to create a custom public control which allows you to connect an event to a user request. This control should persist relation event- request, so you need to make a custom data layer for this implementation.

The other option is using events module with metafileds. Each event is a content item. For each event you can set a custom field like flat taxon, so you can have multiple taxons associated with your content. In this case you need to get the requested item and call SetValue method ( this is DataExtenssions method for Content objects). Then you should have some backend page on which you have another control that displays relation request -event.


Kind regards,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 30-Mar-2011 00:00

Thank you for the feedback, Ivan.

Unfortunately, I cannot see which page demonstrates the Product Catalog sample when I run the project.

Also, I found the page control in the Content section and attempted to drop it onto a test page for me to look at.  I can add it to a page, but every time I try to edit the control when it is on the page, it crashes the development server and I have to relaunch the web app.

What is the best way to see the Product Catalog SDK sample, so I can try to find a solution to my problem?

For the second proposed solution, you are saying that I would have a taxon associated with each event for each inquiry to tie the event and inquiry together, correct?  Where would the inquiries be stored when they are retrieved based on the event taxon in the custom field?  Would they be persisted in Sitefinity or in an external database outside of Sitefinity?

I do not believe the second proposal is currently a viable option for me because I have multiple content providers for my Events (across multiple Sitefinity sites), and I have been informed there is a bug that prevents the use of custom fields in this scenario in the current version of Sitefinity (thread is here).  However, I want to make sure I correctly understand, in case it becomes a possible solution after the upcoming Q1 release.

Thanks.

Posted by Community Admin on 30-Mar-2011 00:00

Hello Geoff,

When you install the SDK you should have Products folder under the location below. There should be a project file with the entire module.

C:\Program Files (x86)\Telerik\Sitefinity SDK 4.0\Samples\CS\Products

For the second proposed solution, you are saying that I would have a taxon associated with each event for each inquiry to tie the event and inquiry together, correct?  Where would the inquiries be stored when they are retrieved based on the event taxon in the custom field?  Would they be persisted in Sitefinity or in an external database outside of Sitefinity?

The custom fields are persisted in our database.Basically you need to create a custom field for your event and set the value for it. You can use comma delimited string in case you do not want to generate a new key for each  event request.

Custom fields are available only per provider and they custom fields for one provider cannot be used for another provider although the type can be the same.

All the best,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 30-Mar-2011 00:00

I see the Products project, but I don't see where it is used in the sample Sitefinity site in the provided solution.  The Jobs, Coverflow, News Rotator, etc, have sample pages, so view the sample module.  I don't see a corresponding page for the Product Catalog module.  From what I can tell, it is listed under the Content section of the PageControls toolbox, but when I try to edit the module after it has been added to a page, it crashes the Development Server.  It does not give an error.  The Development Server simply shuts down and must be restarted through Visual Studio.  This is preventing me from configuring the control, so I do not have a sample of it to view.  I do not want to base my new module on a module that is crashing.  Is this reproducible on another machine?  If so, I'm not sure what would be different on my machine, as I have not used these projects before, so they should be what was installed on my machine with Sitefinity.

For the second solution, I'm planning on having multiple fields associated with each inquiry, such as name, email address, question, etc.  Since I don't believe I can store this in additional fields on the event itself, would it be possible to store these inquiries in their own content library and simply have one of their fields be the event ID that they are associated with?  I don't see a way to create a custom content library within Sitefinity.

Thanks.

Posted by Community Admin on 30-Mar-2011 00:00

Ivan, I just noticed that you said Custom Fields are per provider, but this is contradictory to what Pepi told me here.  Which is the expected behavior?  I don't mean to accuse anyone of giving me inaccurate information.  I'm just looking to understand how the system works to try to find a solution and implement the desired functionality for my client.

Thank you for your help.

Posted by Community Admin on 31-Mar-2011 00:00

Hi Geoff,

The custom fields are created for the type which is Telerik.Sitefinity.Events.Model.Event, so you an share them between the providers. There was a bug that did not show the fields across the providers, but the issue is fixed in SP1, so once you create your custom field for one of the providers you will be able to use it with the other providers you have

Greetings,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 31-Mar-2011 00:00

Ivan, was the bug fixed in SP1 or will it be fixed in the Q1 release?  I have installed SP1 and still have an issue with custom fields across content providers.

Also, how do I programmatically set a custom field on an Event?  I do not see .getvalue() or .setvalue() methods on the Event object.

Thanks.

Posted by Community Admin on 31-Mar-2011 00:00

Hello Geoff,

Can you see the custom fields when you browse between the providers? I do not have problems to set a field.
To use GetValue and SetValue you should have a reference to Telerik.Sitefinity.Model. These are methods of DataExtenssons class.

Regards,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 01-Apr-2011 00:00

Ivan, thank you for the video.  I was able to reproduce your steps.  I'm not sure what I was doing differently before.

Unfortunately I am still encountering issues when attempting to save values to this custom field.  I am able to save values to the custom field using the default content provider, but when I create an event using the second content provider (EventsCustomProvider), I get an alert saying "Specified cast is not valid.".

Also, I created an identical custom field on the second Sitefinity site, where EventsCustomProvider is the default content provider.  I can create events on this site, just fine, as expected.  However, when I attempt to view these events from the first Sitefinity site, where EventsCustomProvider is the secondary content provider, I get an alert saying "Object reference not set to an instance of an object." upon clicking the event title to view the details.

Are you able to reproduce these two scenarios, or are you able to save and edit values to custom fields in your environment?

Thanks.

Posted by Community Admin on 05-Apr-2011 00:00

Ivan,
Were you able to reproduce my issue with modifying the values of custom fields using multiple content providers?  Your video only showed creation of these custom fields, not actually modifying the values.  This feature is part of the core functionality of my client's project, which is scheduled for deployment very soon.  I was under the impression this functionality existed in Sitefinity at the beginning of the project and was hoping that any issues with it could be resolved in the Q1 release.  Please let me know what you find.

Thanks.

Posted by Community Admin on 07-Apr-2011 00:00

Hello Geoff,

I was not able to replicate the issue locally. I suggest that you should try the Sitefinity 4.1 (Q1) release that will be available next week.

Also make sure that you set applicationName parameter of your custom provider. The default provide has applicationName - /Events, so if you want to separate the providers data you should use different value.

Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed