0

Customer lastModifiedDate is not updated if you create cash sale/invoice of particular customer in Netsuite. customer balance is changed but customer lastModifiedDate is not changing. how can I get all those customers their balance is updated as per lastModifiedDate.

Please have a look at code below.

CustomerSearch customerSearch = new CustomerSearch();            
CustomerSearchBasic customerBasic = new CustomerSearchBasic();

customerBasic.lastModifiedDate = new SearchDateField()
{
      @operator = SearchDateFieldOperator.onOrAfter,
      operatorSpecified = true,
      searchValue = new DateTime(2018, 10, 20, 13, 50, 00, DateTimeKind.Utc),
      searchValueSpecified = true,
};

customerSearch.basic = customerBasic;

SearchResult result = ACGApplication.Client.Service.search(customerSearch);
var customerList = result.recordList.Cast<com.netsuite.webservices.Customer>();

1 Answers1

0

I think you can do this via a saved search that looks at dates of transactions that effect customer balance - invoices, cash sales, payments, credits, etc.

Group them by customer with a MAX summary function on the date. If you want “within the last week” or some other criteria, add the MAX summary to the criteria tab of the saved search.

Call the saved search via SuiteTalk.

Suite Resources
  • 1,164
  • 8
  • 11