Page 1 of 1

Contacts. Custom fields

PostPosted: Fri Nov 03, 2017 12:06 pm
by DannyC
I notice there's no custom fields on Contacts, i.e not contacts with debtors or creditors, I mean Contacts Maintenance.
How hard would it be to implement?
Version 7.1

Would you fine chaps need to create the underlying properties, methods etc in the Contacts class before we can do anything via a plugin?

Cheers

Danny

Re: Contacts. Custom fields

PostPosted: Fri Nov 10, 2017 11:15 am
by Mike.Sheen
Ideally we should add the feature in a release of the software, but until then you can always rig up your own - it would be a bit of work, however.

The first thing you'd need is a table to store the data - pretty simple - just make sure you have a column which is a foreign key with delete cascade to CN_Main.ProspectID.
Next you'll need a classes to hold the data, and some code to populate those classes upon read, and to write to table on save - so you'l add event handlers on the contact business logic class ReadEnd and SaveEnding events.
Then you need to add a tab to the form and display the data, as well as handle user input.

I've added improvement DEV-6355 to our backlog to include this.

If you can't wait, we could probably provide something via plugin - but we'd need to bill for that time - roughly 6 hours effort I think - depending on the details.

Mike

Re: Contacts. Custom fields

PostPosted: Fri Oct 04, 2019 7:52 pm
by DannyC
Mike,

I am getting some noise from clients who'd really like this.
Any possibility for something to be developed for the next release?

Re: Contacts. Custom fields

PostPosted: Fri Oct 04, 2019 9:43 pm
by SBarnes
Hi Mike,

I don't know if this would be possible but if this was done as a plugin would it be possible that it could be done generically in that you could set system settings for the custom settings table, the custom setting value table and the business logic maintenance form and that way it could allow adding custom fields to other parts of the system that don't have them now, as I know there is already Form Custom Tabs?

Re: Contacts. Custom fields

PostPosted: Mon Oct 21, 2019 5:47 pm
by SBarnes
Hi Mike,

if we were to have a stab at this in a plugin, is there somewhere where there is an example of adding tabs grammatically, I would have thought the functionality for Form Custom Tabs would do it but I can't locate where this lives.

Re: Contacts. Custom fields  Topic is solved

PostPosted: Tue Oct 22, 2019 2:00 pm
by Mike.Sheen
The Maintenance.UserInteface form, which is the base class for all our maintenance forms (including Contact Maintenance) is where the custom form tabs are added.

A sample plugin is attached showing how to add a tab with a grid (much like the custom fields on other forms) to the Contact Maintenance form.