Solved

How to search a customer by create date through SOAP API?

  • 23 November 2021
  • 1 reply
  • 78 views

Userlevel 2
Badge

Following code is able to search customer by CustomerID. I need to do similar search by Customer’s Create Date. How should I do that?

 

List<Command> cmdSelect = new List<Command>();
            cmdSelect.Add(AR303000.CustomerSummary.ServiceCommands.EveryCustomerID);

            cmdSelect.Add(AR303000.CustomerSummary.CustomerID);
            cmdSelect.Add(AR303000.CustomerSummary.CustomerClass);
            cmdSelect.Add(AR303000.GeneralAccountAddress.AddressLine1);
            cmdSelect.Add(AR303000.GeneralAccountAddress.City);
            cmdSelect.Add(AR303000.GeneralAccountAddress.State);
            cmdSelect.Add(AR303000.GeneralAccountAddress.PostalCode);
            cmdSelect.Add(AR303000.Contacts.Contact);

            List<Filter> filters = new List<Filter>();
            filters.Add(new Filter()
            {
                Field = new Field()
                {
                    FieldName = AR303000.CustomerSummary.CustomerID.FieldName,
                    ObjectName = AR303000.CustomerSummary.CustomerID.ObjectName
                },
                Condition = FilterCondition.Equals,
                Value = "CUST1XTEST1",
                Operator = FilterOperator.And
            });

icon

Best answer by adilaleem 23 November 2021, 21:54

View original

1 reply

Userlevel 2
Badge

I found the answer:

 

Field = new Field
                {
                    ObjectName = AR303000.CustomerSummary.CustomerID.ObjectName,
                    FieldName = "LastModifiedDateTime"
                },
                Condition = FilterCondition.Greater,
                Value = DateTime.Now.AddMonths(-1).ToLongDateString()

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved