Import custom module with relationship to accounts

Hello.

I created a custom module - "Customer Licenses" and established a relationship to Accounts.

Sugar correctly created the module and added the subpanel to Accounts. I can add "customer license" records. Everything looks and works well. The table is in the DB as is the relationship table (accounts_customer_licenses).

Now I want to import customer_license records from our legacy system into Sugar.  I go to "Import" and download the import template.  The correct customer_license columns/fields are there.

But there is no way to relate these to accounts. When I read the Import guide and the Importing Related Records guide, they both state we should fill in the appropriate account ID field (after getting the account ID).  We've done this with several other types of modules (contacts, cases, etc.).  But there is no Account ID field in the customer_license import template - so nothing to fill in and no way to relate these imported records to their associated account.

I suppose we could write routines to load the customer_licenses and then manually load records in the join table (accounts_customer_licenses) but we certainly don't want to go through all that trouble.

Are we missing something here?  As far as I can tell, we're trying to do the same thing with this import that we would be doing if we were trying to import Contacts and relate them to Accounts.  In that case, there is also a relationship table and it gets populated because there is an Account_ID column in the Contacts import template.

Thanks very much for your help.

Bob

Parents Reply

  • That is curious, perhaps there is something special about those import processes that was built just for those modules.

    I've never worked in the Sugar Cloud environment, always on-site so things are a little different for me.

    You could try to see if you can understand what it is that is different in the Import process for those standard modules (reverse engineer it in a local copy of your SgarCRM) and customize your custom module's Import to mirror those or see if you can leverage the Sugar APIs to do your import and link the beans programmatically.

    Best of luck!

    Francesca

Children
No Data