Create Relationship between 2 custom modules using field data

I have 2 modules that both have a unique id field that is NOT the SuiteCRM Record ID. These values are identical in both modules. Can these fields be used to create a relationship between the 2 modules using our unique id? I’ve tried to code this into my upload script using retrieve_by_string_fields() then load_relationship but get a database failure.

My upload script uses CSV and the ids exist within, however, if there is a better way to script this, or use a workflow to run on records within the database already, eliminating the addition of time it takes to complete uploads, that is preferable. Already takes forever for just a few records (15000 records over 24 hours, doesn’t seem right, but its working so it is what it is :S )

I brought something similar up a while back but don’t think I or Mr Crown Royal explained it very well

To be clear:

Module 1 is a huge pool of individuals - this modules contains extra information and should be linked to from Module 2
Module 2 is actual members - Contains company specific data only (Related field links to Module 1)

No relationships between the two are yet established

This

is likely happening because of this:

If you create a proper SuiteCRM relationship, you can manipulate it through beans. You could get all the records related, based on your own field. SuiteCRM would then implement its normal mechanism, and add a middle table with both SuiteCRM ids in there.