In that case yes, this may be the better way. My changes occur mostly occur in addEventUI.php (which is weird, you would expect a TPL file for this). Here I add some input fields and attach jQuery UI's autocomplete. One to fill the parent_id (which is always an account in this case) and fills the native CRM's field. This also auto-updates the subject field with the activitytype concatenated by the account name. The account's address auto fills the second input field I added, which is location. The third auto input field also has an auto-complete function attached and fills the salesorder number (and limits the autocomplete to the salesorders from the account field). For this, I created a new database table called 'so_activityrel'. A separate PHP file fills this table.
In the file that retrieves the events (I think it is the main PHP file of the module) I added some things to retrieve the related salesorder and add it to the white pop-up you see when you click an event.
There's also some javascript in place that prevents an event from saving if no salesorder was chosen and that updates the salesorder's due date to the event date (and sets the salesorder's status to the custom status 'planned') when an event is saved with a sales order picked. This also required an extra php file.
This is what I hacked into the module as far as I can remember from the top of my head. I'll create a github repo from the install to point to the exact changes.
In the file that retrieves the events (I think it is the main PHP file of the module) I added some things to retrieve the related salesorder and add it to the white pop-up you see when you click an event.
There's also some javascript in place that prevents an event from saving if no salesorder was chosen and that updates the salesorder's due date to the event date (and sets the salesorder's status to the custom status 'planned') when an event is saved with a sales order picked. This also required an extra php file.
This is what I hacked into the module as far as I can remember from the top of my head. I'll create a github repo from the install to point to the exact changes.