Security Group: associate several users with a record

Hi, i explain what I would like to do:
I have um custom form and I would like the records of this form to be made accessible only to certain users.
Module A
Record 1 (accessible to users: A, B, C)
Record 2 (accessible to users: A, D, E)
Record 3 (accessible to users: F, G, H)

in a nutshell, I would like to create groups that can be associated with records, so, taking the example above, group1 will contain users A, B, C
group2 will contain users A, D, E
group3 will contain users F, G, H

I tried to follow Suite’s guide, but I was unable to recreate the scenario I described above.
the only thing i have done is to assign that record to a single user via the “assigned to” field of the form, this is exactly what i would like to do, but instead of the single user, it should refer to the entire group.
Can anyone tell me how to do this please? Thank you.

Here is the guide for typical group setup with security group. I believe you will need group only option.

Yes, as mentioned above, I tried to follow the guides you posted, but I couldn’t do it.
I created the group, associated the users to the group, created the roles, went to my form list and associated with the record selection, a security group “Security Suite: Global Assignment” (although I don’t know if this works, once selected and started, it does something, but then reverts to the initial settings).
In any case, I exit Admin and enter as a user, I don’t see that record.

I hope you have assigned the role to that security group. I don’t see any problem if you followed this.

It would work for sure.

Yes, I have assigned the role to the group, surely there is something I am forgetting or making a mistake… what I am missing is to assign the group to that record.
If, via the “assign to” field, I assign that record to a single user, logging in as that user, the record is seen regularly. I cannot associate the group to that record.

In list view, You will have Security groups: Mass Assign

Select record and assign it to group. You will also have subpanel in detailview too.

Yes, I’ve done that too, but as I said above, when I press the assign button it’s as if it doesn’t do anything, it refreshes the page and returns the value of “Security Suite: global assignment” to the initial value: “Group: none”.

Yes, that behavior is correct as it is a listview, this is for updating records not to shown the value. In detail view of your record, Do you have subpanel of Security group?

Actually there wasn’t, I added a many-to-many relationship… anyway, yes under that record there is indeed, in the subpanel of the security group, the group I created

I believe you don’t need to create custom relationship. by default you will have it.

If you have custom module check vardefs.php
VardefManager::createVardef(‘modulename’, ‘modulename’, array(‘basic’,‘assignable’,‘security_groups’));
Do you have entry of ‘security_groups’ into it.

Exactly as you say, in modules/YourModulename/vardefs.php
the line is perfectly present:
VardefManager::createVardef(‘modulename’, ‘modulename’, array(‘basic’,‘assignable’,‘security_groups’));

OK, I saw that among the existing relationships, the one between my custom module and the security group was already present, so I deleted the one I created and now I see the results.
Two things:

1 - why in my custom module I do not see the subpanel of the security group even though it is present among the relationships? How can I make it visible?

2 - what if I make a mistake and want to change the association to another security group? I have tried reassociating, but nothing happens, I could only change it by entering each individual record.