Create fields that are only stored once but can be linked to both lead or client

Hi,
I am quite new to SuiteCRM and have so far customized it to suit our needs by adding fields to the Contacts (renamed to Clients, since we have a B2C model) and Leads.
My next step requires something more complicated and would like to get some advice on how to accomplish this. I want our wordpress website to use the CRM as an authentication database for it’s user. This should be possible with a plugin that will use a simple mysql select to authenticate. But both leads and contacts are able to register on the website and I can only do 1 query per login. I was thinking (correct me if i am wrong) to create a custom module that holds a username, hashed password and user role/type information. This module would then be linked to either a conact or lead. if a lead is converted the relation would also be attached to the contact record. The custom module would then be shown as a subpanel at the lead/client record.

Will this work? I have been testing with creating a custom module with a one to one relationship to both leads and contacts, but the module does not show up as a subpanel anywhere.

Any help or advice is greatly appreciated.

I am using SuiteCRM 7.6

I think that, in order to see a panel with the related records, you have to create a one-to-many or a many-to-many relationship.

If you create a one-to-one you should only get a field. When clicked while in Edit mode, this field should open a popup to select the related record from the other module.

1 Like

Thanks for the pointer. I was looking for password, username fields to drag into the layout, but that’s not how it works apparently. After deploying the custom module it automatically added the linked record to the first empty spot on the edit view layout and i had not noticed. now it’s there, not exactly how i would have wanted it, but it (hopefully) works. now to test it with the wordpress site.