Exemple #1
0
        public static void PreparingStatus(IOrganizationService orgSvc, Entity entity, DateTime?signingDateFact, DateTime?paymentDate, DateTime?activateDate, OptionSetValue paymentOption, EntityReference mainOpportunity, DateTime?estimatedCloseDate)
        {
            if (CheckSigningDate(signingDateFact, paymentDate))
            {
                HelperMethods.AddInstanceForUpdate(entity, 1);
            }

            if (CheckAct(signingDateFact, paymentDate, activateDate))
            {
                HelperMethods.AddInstanceForUpdate(entity, 2);
            }

            if (CheckEstimatedCloseDate(paymentOption, mainOpportunity, estimatedCloseDate))
            {
                HelperMethods.AddInstanceForUpdate(entity, 3);
            }

            if (CheckEstimatedEscrowUnclosedDate(paymentOption, mainOpportunity, estimatedCloseDate, orgSvc))
            {
                HelperMethods.AddInstanceForUpdate(entity, 3);
            }

            if (CheckDelayDate(mainOpportunity, estimatedCloseDate))
            {
                HelperMethods.AddInstanceForUpdate(entity, 4);
            }

            if (CheckDelayEscrowDate(mainOpportunity, estimatedCloseDate, orgSvc))
            {
                HelperMethods.AddInstanceForUpdate(entity, 4);
            }
        }