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
Bookmarks