Is is possible to copy the relate fields when the Duplicate button is pressed (in our instance the Contact relationship with a particular Case would created with the new duplicate Case when you press Duplicate)?
Thanks.
Is is possible to copy the relate fields when the Duplicate button is pressed (in our instance the Contact relationship with a particular Case would created with the new duplicate Case when you press Duplicate)?
Thanks.
Hi JWG
It is possible but you need to perform several customizations:
1. custom/modules/Cases/metadata/detailviewdefs.php:
1.1. add a hidden button into form (is_duplicate);
1.2. override the Duplicate button to set the value for this new field;
2. custom/modules/Cases/controller.php
2.1. override the function action_save, which will check if the field is_duplicate is set to duplicate and duplicate the relationships
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
André, I am afraid that overriding the function action_save is getting way beyond my ability! But many thanks for for your help.
EDIT
I found a way round, I used the studio to set up a new one-to-many relationship between contact and case and used that instead of the standard many-to-many one.
Last edited by JWG; 2008-10-26 at 11:39 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks