Custom Module and Related List

Custom Module and Related List

I've created a custom module and now want to relate that to the Leads module. I'm having trouble getting my head around the best way to do this.

I'm adding the leads using the crm api and at the same time I'm creating a record in my custom module. The field that should link them (to avoid duplicates in custom module) is email address. Should I be using email address as the required Untitled Name field when I create the custom module?

Whilst adding the records I'm assigning the returned IDs to variables so that I can use them with the updateRelatedRecords function (as this seems the logical thing to do?)

What I want to see in the crm is in the custom module I should see a list of all leads related to it.

In the Leads module I should see the related custom module record.

First question is what lookup fields should I be adding to custom module/Leads?

How should I be creating that relationship using api functions? I assume updateRelatedRecords but will I need to call that twice? Once for Leads and once for custom module?