Results 1 to 4 of 4

Thread: Reassign Opportunity (does not reasign Account, Contact, Contract)

  1. #1
    serbanghita is offline Sugar Community Member
    Join Date
    Jan 2009
    Location
    Bucharest
    Posts
    42

    Post Reassign Opportunity (does not reasign Account, Contact, Contract)

    Hello,

    I am re-assigning an Opportunity from user X to user Y.

    Expected result:
    Opportunity assigned to Y
    Opportunity Contact assigned to Y
    Opportunity Account assigned to Y
    Opportunity Contract (if exists) assigned to Y

    Actual result:
    Opportunity assigned to Y
    The rest are still assigned to X

    Please tell me what to do. This feature should be inside the default SugarCRM core. Thanks a lot!

  2. #2
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Reassign Opportunity (does not reasign Account, Contact, Contract)

    I think it is down to personal choice if reassigning a user on an opportunitie also reassigns accounts etc. - it is not something I would want

    You can do it with a before save logic hook
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  3. #3
    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: Reassign Opportunity (does not reasign Account, Contact, Contract)

    Quote Originally Posted by mikesolomon View Post
    I think it is down to personal choice if reassigning a user on an opportunitie also reassigns accounts etc. - it is not something I would want

    You can do it with a before save logic hook
    I follow Mike suggestion, and I would like to contribute a bit more here.
    One Account may have several Opportunities, and what would happen if whenver an Opportunity is reassigned its Account is also reasigned? Perhaps you have got a nightmare!
    So I would like to suggest you to reassign only the Opportunity childs, not the parent and related records.

    Regards
    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.

  4. #4
    serbanghita is offline Sugar Community Member
    Join Date
    Jan 2009
    Location
    Bucharest
    Posts
    42

    Post Re: Reassign Opportunity (does not reasign Account, Contact, Contract)

    mikesolomon - i will follow your suggestion for my custom case

    andopes - thanks for clarifying things, you are right. I'm thinking of doing following scenario in the before_save hook:

    PHP Code:
    Opportunity O is reassigned from user U-old to user U-new.

    if (
    O has Contacts attached){
     
    reassign Contacts to user U-new;
    }
    if(
    O has Contract attached){
     
    reassign Contracts to user U-new;
    }
    if(
    O has Account attached){
     
    //single Account
     
    if(Account has only this Opportunity attached){
      
    reassign Account to user U-new;
     } else {
     
    //multiple Account (make the Account visible if the U-new user is in a different team from U-old)
      
    attach to the Account the Team of the U-new user
     
    }

    Do you see anything wrong with this pseudo code? I want to implement this on my current instance of SugarCRM. Thanks.
    SugarCRM PRO 6.2.4 (Build 6735)
    Apache 2.x, Linux flavour
    PHP 5.2.x, MySQL 5.x

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 12
    Last Post: 2010-06-15, 12:51 PM
  2. Replies: 1
    Last Post: 2009-09-16, 02:49 PM
  3. How to add a Picture to a lead,contact,account,opportunity?
    By srini123 in forum Marketing/Campaign Management
    Replies: 0
    Last Post: 2009-05-13, 05:38 AM
  4. Relate Opportunity Notes to both Account and Contact
    By jdhamilton in forum General Discussion
    Replies: 1
    Last Post: 2009-04-14, 04:10 PM
  5. Replies: 3
    Last Post: 2007-12-05, 06:18 PM

Tags for this Thread

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
  •