AnsweredAssumed Answered

Copy record and all records related.

Question asked by jlabuelo on Sep 12, 2017

Good Afternoon

We are using SugarCRM CE 6.5.25 and would like to build a new custom method that would copy a record "moduleA1" from a custom ModuleA, but not only copy all the values of moduleA1 to a new record "moduleA2", but also to copy all its recrords related from other modules to "moduleA1".

I mean imagine that I have "moduleA1" which is related to other records "moduleC1, moduleD1..." If I copy the record moduleA1, I would need also to copy their related records to "moduleC2, moduleD2.." where moduleD1 and moduleD2 are copies from moduleC1 and moduleC2

Is this possible in SugarCRM CE 6.5.25 with the button "Duplicate" or I would need to create the custom code by my own?


I have checked some posts that talk about extending the relationships when you copy a record, however these solutions "move" related records from original to copy, and I would need related records to be copied to the "copy"


Thanks a lot