This closes #540.  As Jim had mentioned in the call, the SELECT statements simply needed to have "deleted=0" added to the query.  This was the case for the user, contact and the lead.  I have tested each of these and now the entry is added for the appropriate user, contact and lead, regardless of whether they had been deleted previously.  This holds true for clicking both the "save" and the "save and send invites" buttons.
This closes #540.  As Jim had mentioned in the call, the SELECT statements simply needed to have "deleted=0" added to the query.  This was the case for the user, contact and the lead.  I have tested each of these and now the entry is added for the appropriate user, contact and lead, regardless of whether they had been deleted previously.  This holds true for clicking both the "save" and the "save and send invites" buttons.

cumanacr/SuiteCRM,KhyberPass/SuiteCRM,dfstrauss/SuiteCRM,recci/SuiteCRM,lionixevolve/LionixCRM,cumanacr/SuiteCRM,JimMackin/SuiteCRM,KhyberPass/SuiteCRM,root-smith/SuiteCRM,nadilhassan/SuiteCRM,Accendere/SuiteCRM,lionixevolve/SuiteCRM,lionixevolve/LionixCRM,dfstrauss/SuiteCRM,gunnicom/SuiteCRM,horus68/SuiteCRM-Horus68,ChangezKhan/SuiteCRM,cumanacr/SuiteCRM,ChangezKhan/SuiteCRM,tfreier/SuiteCRM,daniel-samson/SuiteCRM,Dillon-Brown/SuiteCRM,tfreier/SuiteCRM,horus68/SuiteCRM,scottiems/crm-limai,jakubpas/SuiteCRM,lionixevolve/SuiteCRM,salesagility-davidthomson/SuiteCRM,pgorod/SuiteCRM,horus68/SuiteCRM,scottiems/crm-limai,lionixevolve/SuiteCRM,haris-raheem/SuiteCRM,gunnicom/SuiteCRM,recci/SuiteCRM,lionixevolve/LionixCRM,ChangezKhan/SuiteCRM,shogunpol/SuiteCRM,pribeiro42/SuiteCRM,dfstrauss/SuiteCRM,root-smith/SuiteCRM,pribeiro42/SuiteCRM,MikeyJC/SuiteCRM,pgorod/SuiteCRM,salesagility-davidthomson/SuiteCRM,digitalmcgrath/SuiteCRM,KhyberPass/SuiteCRM,ghermans/SuiteCRM,gody01/SuiteCRM,shogunpol/SuiteCRM,ChangezKhan/SuiteCRM,Dillon-Brown/SuiteCRM,noelhunter/SuiteCRM,cumanacr/SuiteCRM,lionixevolve/LionixCRM,nadilhassan/SuiteCRM,vladbar/SuiteCRM,lionixevolve/LionixCRM,Accendere/SuiteCRM,gunnicom/SuiteCRM,pgorod/SuiteCRM,noelhunter/SuiteCRM,haris-raheem/SuiteCRM,jakubpas/SuiteCRM,horus68/SuiteCRM-Horus68,shogunpol/SuiteCRM,salesagility/SuiteCRM,gody01/SuiteCRM,JanSiero/SuiteCRM,adamjakab/SuiteCRM,vladbar/SuiteCRM,krzyc/SuiteCRM,noelhunter/SuiteCRM,gymad/SuiteCRM,gunnicom/SuiteCRM,lionixevolve/SuiteCRM,leonardobarrientosc/SuiteCRM,Dillon-Brown/SuiteCRM,JanSiero/SuiteCRM,recci/SuiteCRM,adamjakab/SuiteCRM,gymad/SuiteCRM,dfstrauss/SuiteCRM,scottiems/crm-limai,lionixevolve/LionixCRM,leonardobarrientosc/SuiteCRM,scottiems/crm-limai,willrennie/SuiteCRM,ryoon/SuiteCRM,gymad/SuiteCRM,digitalmcgrath/SuiteCRM,gody01/SuiteCRM,Accendere/SuiteCRM,Dillon-Brown/SuiteCRM,gcoop-libre/SuiteCRM,willrennie/SuiteCRM,krzyc/SuiteCRM,JanSiero/SuiteCRM,salesagility/SuiteCRM,JimMackin/SuiteCRM,daniel-samson/SuiteCRM,krzyc/SuiteCRM,leonardobarrientosc/SuiteCRM,ghermans/SuiteCRM,haris-raheem/SuiteCRM,salesagility-davidthomson/SuiteCRM,pgorod/SuiteCRM,horus68/SuiteCRM-Horus68,horus68/SuiteCRM,nadilhassan/SuiteCRM,nadilhassan/SuiteCRM,samus-aran/SuiteCRM,gcoop-libre/SuiteCRM,KhyberPass/SuiteCRM,gcoop-libre/SuiteCRM,salesagility/SuiteCRM,ryoon/SuiteCRM,willrennie/SuiteCRM,vladbar/SuiteCRM,MikeyJC/SuiteCRM,root-smith/SuiteCRM,MikeyJC/SuiteCRM,adamjakab/SuiteCRM,willrennie/SuiteCRM,krzyc/SuiteCRM,digitalmcgrath/SuiteCRM,horus68/SuiteCRM-Horus68,noelhunter/SuiteCRM,shogunpol/SuiteCRM,ryoon/SuiteCRM,MikeyJC/SuiteCRM,gody01/SuiteCRM,JimMackin/SuiteCRM,adamjakab/SuiteCRM,samus-aran/SuiteCRM,salesagility-davidthomson/SuiteCRM,daniel-samson/SuiteCRM,JanSiero/SuiteCRM,ghermans/SuiteCRM,salesagility/SuiteCRM,tfreier/SuiteCRM,JimMackin/SuiteCRM,pribeiro42/SuiteCRM,pribeiro42/SuiteCRM,samus-aran/SuiteCRM,haris-raheem/SuiteCRM,gcoop-libre/SuiteCRM,root-smith/SuiteCRM,recci/SuiteCRM,leonardobarrientosc/SuiteCRM,gymad/SuiteCRM,samus-aran/SuiteCRM,daniel-samson/SuiteCRM,jakubpas/SuiteCRM,Accendere/SuiteCRM