Exemplo n.º 1
0
 private static bool GetLeadFrom(IOpportunityTarget opportunityTarget, out ISaleStageHistory result)
 {
     result = null;
     if (opportunityTarget != null)
     {
         return(GetLeadFrom(opportunityTarget.SourceOpportunity as ILeadTarget, out result));
     }
     return(false);
 }
Exemplo n.º 2
0
 private static bool GetLeadFrom(ILeadTarget leadTarget, out ISaleStageHistory result)
 {
     result = null;
     if (leadTarget != null)
     {
         result = leadTarget.SourceLead as ISaleStageHistory;
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
        public static ISaleStageHistory GetHistory(ISaleStageHistoryTarget saleStageHistoryTarget)
        {
            ISaleStageHistory result = null;

            if (GetLeadFrom(saleStageHistoryTarget as ILeadTarget, out result))
            {
                return(result);
            }
            if (GetLeadFrom(saleStageHistoryTarget as IOpportunityTarget, out result))
            {
                return(result);
            }
            return(null);
        }