Need Select list in Contracts filtered by socid

Hi everyone. I have developed a module called Vehicles. This module is a list of cars by VIN, and each one you can choose a Third-party that the vehicle belongs to.

In Contracts, I would like to add a Complementary Attribute (lines) that is a select list of Vehicles that is filtered based upon the Third-party that has been chosen for the Contract.

So I am having difficulty getting this select list being related between the Contract and Vehicle.

I tried to use $ID$, but the problem is that $ID$ does not become available until the Contract has been validated. I need to select the vehicle when adding a line.

I tried to use $object->socid, and this works, but only for type Integer. It doesn’t seem to work for Select List Table.

So can someone tell me how to create a select list that is filtered by the selected Third-Party for a Contract?

Also, in the examples.


I am not sure what “parent_list_code” is in reference to. Can someone please explain? It doesn’t seem to do anything.