Results 1 to 3 of 3

Thread: Copy relate with Duplicate button

  1. #1
    JWG
    JWG is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    48

    Default Copy relate with Duplicate button

    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.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Copy relate with Duplicate button

    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.

  3. #3
    JWG
    JWG is offline Sugar Community Member
    Join Date
    Sep 2006
    Posts
    48

    Default Re: Copy relate with Duplicate button

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. another address copy button
    By dermartn in forum Developer Help
    Replies: 0
    Last Post: 2008-08-28, 11:33 AM
  2. MultiSelect RELATE button
    By ToniFatec in forum Developer Help
    Replies: 2
    Last Post: 2008-05-28, 06:13 PM
  3. Replies: 2
    Last Post: 2007-10-02, 12:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •