Skip to main content
Solved

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

  • November 23, 2021
  • 1 reply
  • 88 views

Forum|alt.badge.img

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
            });

Best answer by adilaleem

I found the answer:

 

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

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 20 replies
  • Answer
  • November 23, 2021

I found the answer:

 

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings