Many to many relationship build!

Hello,

I’m trying to create functional many to many relationship for mass importing. I have Contacts and custom built Project module, relationship is set many to many between them. I want to be able to import different projects for each Contacts and in way that I have let’s say 200 users and 10 Projects in one batch for import.

Of course somehow import should be done within SuiteCRM interface, and not using SQL tools. I guess that middle table that has been created should be imported into SuiteCRM as a custom module and to have all of the features as standard custom built one, like import section, view and create.

I have looked around for similar questions about it, but none covers how to actually import mass data into that middle table from SuiteCRM interface.

Is there a way to do this within SuiteCRM without complicated coding?

Thank you very much.

Best Regards,

Slaven.

can you bit ellaborate with screenshoot or example.

Hi arshath,

I completely overlooked this topic. Don’t ask me why. Anyways, what was I trying to say before, when you create many to many relationships, a new table is created that stores their IDs, but that table is not visible in SuiteCRM, so there is no way to update it and then run queries for reporting unless you are doing it from the database itself.

Inittialy when you build such relationship 2 fields are created, on each sides, e.g. in Contacts and Custom build module but you can’t update them using import function on any side and they still behave like one to many not many to many.

So, I guess the goal is to bring up that middle table and customize SuiteCRM to use Import function on that table within SuiteCRM GUI. Also, that middle table should be shown in Studio, so that you can add new fields.

You can’t manipulate the Relationship tables with Studio. If you really need to add fields there (fields that describe the Relationship, not any of the two modules it connects) then you must go into a more complicated set up:

http://sugarmods.co.uk/how-to-add-custom-fields-to-a-relationship-table-and-display-them-in-a-subpanel-sugarcrm-suitecrm/#comment-12573

About the Import: you also can’t import into the Relationship tables. I know that for related fields you can use the ids of the related field and SuiteCRM should be clever enough to connect to the related bean. But this will be different if you have a full-blown relationship.

Check this out to see if it helps:
http://support.sugarcrm.com/Knowledge_Base/Import_Export/Importing_Related_Records/

But that is for a newer version of SugarCRM, some things don’t apply.

If you can’t get it to work that way, you’ll have to write an importer script in PHP. It’s simple stuff, but it does require a developer.

EDIT: new video resources: