Example #1
0
        public static void UpdateLastTextDate(SforceService _binding, string LeadID)
        {
            Dealer_Lead__c application = new Dealer_Lead__c();

            application.Id = LeadID;
            application.BRGCaseMail_DateTime_Last_Text__c          = DateTime.Now;
            application.BRGCaseMail_DateTime_Last_Text__cSpecified = true;
            application.BRGCaseMail_Number_Texts_Sent__c           = application.BRGCaseMail_Number_Texts_Sent__c + 1;
            application.BRGCaseMail_Number_Texts_Sent__cSpecified  = true;

            if (application.BRGCaseMail_Number_Texts_Sent__c != null)
            {
                application.BRGCaseMail_Number_Texts_Sent__c += 1;
            }
            else
            {
                application.BRGCaseMail_Number_Texts_Sent__c = 1;
            }

            //call update passing an array of object

            // assuming that you've already established an enterprise WSDL binding

            SaveResult[] saveResults = _binding.update(
                new sObject[] { application });
        }
Example #2
0
        public static void UpdateStatusToFresh(SforceService _binding, string LeadID)
        {
            Dealer_Lead__c application = new Dealer_Lead__c();

            application.Id = LeadID;
            application.BRGCaseMail_Lead_Status__c                    = "FRESH";
            application.BRGCaseMail_Resend_via_Email_Text__c          = false;
            application.BRGCaseMail_Resend_via_Email_Text__cSpecified = true;

            //call update passing an array of object

            // assuming that you've already established an enterprise WSDL binding

            SaveResult[] saveResults = _binding.update(
                new sObject[] { application });
        }
Example #3
0
        public static void UpdateLastViewedAndStatus(SforceService _binding, string Status, string LeadID)
        {
            Dealer_Lead__c application = new Dealer_Lead__c();

            application.Id = LeadID;
            application.BRGCaseMail_Lead_Status__c          = Status;
            application.BRGCaseMail_Last_Viewed__c          = DateTime.Now;
            application.BRGCaseMail_Last_Viewed__cSpecified = true;

            //call update passing an array of object

            // assuming that you've already established an enterprise WSDL binding

            SaveResult[] saveResults = _binding.update(
                new sObject[] { application });
        }
Example #4
0
        public static void UpdateApplicationStatusAndGrossProfit(SforceService _binding, double _grossProfit, string Status, string LeadID)
        {
            Dealer_Lead__c application = new Dealer_Lead__c();

            application.Id = LeadID;

            if (_grossProfit > 0)
            {
                application.BRGCaseMail_Gross_Profit__c          = _grossProfit;
                application.BRGCaseMail_Gross_Profit__cSpecified = true;
            }

            application.BRGCaseMail_Lead_Status__c = Status;

            //call update passing an array of object

            // assuming that you've already established an enterprise WSDL binding

            SaveResult[] saveResults = _binding.update(
                new sObject[] { application });
        }