show date in calendar from custom module

Hi,
I created a module for managing appointments with the module builder (SuiteCRM 7.10.14).
I can not display dates, insert through my appointment form, in the global calendar.
I checked with both the studio and the module builder but there is no way.
Some idea?

Thanks :slight_smile:

Based on the documentation (https://docs.suitecrm.com/user/core-modules/calendar/) the calendar pulls the information from different modules. if you want to display information in the calendar you might need to create records via workflow or logic hooks into the standard modules or you modify the Calendar module backend to query the records from your custom module.

Thanks, I think I will choose the way to modify the backend of the calendar module.
Can you tell me where to find some similar examples? I’m new to developing suites :frowning:

I haven’t done anything like that personally. Here is a link that might be helpful to you:

https://suitecrm.com/suitecrm/forum/developer-help/1780-editing-calendar-entries

Good luck!!

thanks AlxGr I’ll try to make some changes to the code

Solved!
In order to view the dates in the calendar taken from a new custom module, I made changes to the following files in /modules/Calendar/:
[ul]
[li]
Calendar.php -> in the Calendar class I added a new value to the array of the property $activityList

"Eli1_Appuntamenti" => array("showCompleted" => true,"start" =>  "dalle", "end" => "alle"

[/li]
[li]CalendarDisplay.php -> in the CalendarDisplay class I added a new value to the array of the property $activity_colors

 'Eli1_Appuntamenti' => array(
            'border' => 'e0af1a',
            'body' => 'f98a24',
            'text' => 'ffffff'
        )

[/li]
[li]CalendarUtils.php -> in the CalendarUtils class I added a new value to returned array of the method get_fields()

'Eli1_Appuntamenti' => array(
                'name',
                'dalle',
                'alle',
                'description'
            )

[/li]
[/ul]

4 Likes

Glad you made it work. Thanks for sharing the solution!!

did you change the way your directory was set up? I get a database failure

I realized the fields I was using was in a _cstm table so I changed it, resulting in no database failure.

But the changes this post highlighted resulted in my Calendar not showing.

In calendar.php


"Time_Monthlytimesheet" => array("showCompleted" => true,"start" =>  "date_entered", "end" => "date_exited"

both are datetime fields.

Same here :frowning: Cant get it working with fields from _cstm table. Anyone has a solution?