Beispiel #1
0
        private static void DeleteRecordsFromSalesForce(EnterpriseWsdl.SessionHeader header, EnterpriseWsdl.SoapClient apiClient)
        {
            Console.WriteLine("Deleting ...");

            EnterpriseWsdl.DeleteResult[] deleteResults;
            string[] ids = new string[] { "a012000001f7eLM" };
            EnterpriseWsdl.LimitInfo[] limitInfo;

            apiClient.delete(header, null, null, null, null, null, null, null, null, ids, out limitInfo, out deleteResults);
            EnterpriseWsdl.DeleteResult deleteResult = deleteResults[0];

            if (deleteResult.success)
            {
                Console.WriteLine("Record ID " + deleteResult.id + " deleted succesfully.");
            }
            else
            {
                Console.WriteLine("Delete failed");
            }

            //foreach (var id in ids)
            //{
            //    Console.WriteLine(id);
            //}

            Console.ReadLine();
        }
Beispiel #2
0
        // Manually deleting one or many records from SALESFORCE
        private static void DeleteMassRecordsFromSalesForce(EnterpriseWsdl.SoapClient apiClient, string[] ids)
        {
            Console.WriteLine("Deleting mass records ...");

            EnterpriseWsdl.DeleteResult[] deleteResults;

            EnterpriseWsdl.LimitInfo[] limitInfo;

            apiClient.delete(header, null, null, null, null, null, null, null, null, null, ids, out limitInfo, out deleteResults);
            EnterpriseWsdl.DeleteResult deleteResult = deleteResults[0];

            if (deleteResult.success)
            {
                Console.WriteLine("Mass records candidate " + deleteResult.id + " deleted succesfully.");
            }
            else
            {
                Console.WriteLine("Delete failed");
            }
        }