Relate field does not update during import in SugarCRM

I have build custom Module in SugarCRM and added a custom field of type 'relate' and linked with Accounts module. When I insert new record for this custom module via normal add/edit view it works perfectly alright and I can select an account via Account Name field. However when I use Import feature via CSV file it does not link with Accounts module however the Account already exists with same name. Same Account Name is working for other modules during import.

I am working on SugarCRM 6.5, I have build Custom Module via Module Builder than added custom field via Studio and also I have Many to Many relationship with this custom Contacts Module and Accounts Module.

Also as per the documentation when we create a relationship it automatically generates a field for relevant modules, but I do not see this happening in case of many-to-many relationship that's why I had to create a relate field that correspond to Accounts module.

Any help in this regard will be appreciated, I have already spent lot of time already to figure this out.

Parents
  • Aamir,

    I am not sure if you are using the Community Edition, so I tested this in CE 6.5.22. The steps I took to reproduce this scenario are:

    1. I created a test contact type module, deployed it
    2. In Studio > Contacts > Fields > Created a custom relate field that points to the Accounts module
    3. Added the relate field to the Contacts Edit and Detail view layouts
    4. Manually created a record in the Test custom module and related an account to it
    5. From the Test custom module listview, I exported it in order to see how therelate field was formatted
    6. Within the CSV file I removed all the columns except the required fields and the account relate field and renamed the last name field to a different value
    7. Imported the file into the Test custom module

    The related account in the relate field displayed after the import. 

    Can you verify if the account ID is mapped to the correct relate field during the import process?

    Lori

Reply
  • Aamir,

    I am not sure if you are using the Community Edition, so I tested this in CE 6.5.22. The steps I took to reproduce this scenario are:

    1. I created a test contact type module, deployed it
    2. In Studio > Contacts > Fields > Created a custom relate field that points to the Accounts module
    3. Added the relate field to the Contacts Edit and Detail view layouts
    4. Manually created a record in the Test custom module and related an account to it
    5. From the Test custom module listview, I exported it in order to see how therelate field was formatted
    6. Within the CSV file I removed all the columns except the required fields and the account relate field and renamed the last name field to a different value
    7. Imported the file into the Test custom module

    The related account in the relate field displayed after the import. 

    Can you verify if the account ID is mapped to the correct relate field during the import process?

    Lori

Children
  • Hello Lori,

    Thanks for taking time for looking into this issue.

    Yes, I am mapping to the right field. The field name is Account Name and this is the only field with this name. Even if I export these Contacts and then import the same csv file back in it does not consider the Account Name after import. Account Name field remains empty.

    Also I have a query regarding many-to-many relationship. Should't there be a field already as I have setup many-to-many relationship as well between this VIP Contacts module and Accounts module?

    Kind Regards

    Aamir