1

I have a custom system built that performs a daily Customer search via the SuiteTalk API to collect Customers that have been modified in the last 24 hours.

This system has been working fine for about a year, but now, someone has implemented a field in NetSuite that auto calculates the the balance owed by the customer. I believe this calculated field is resulting in every single Customer record being logged as modified every day. Now my API calls return every customer in the system, which is thousands. The customer records that are legitimately modified should only be in the hundreds.

Is there any way for me to ignore this specific field in my API call, so I don't retrieve every single customer record?

If it is worht referencing, I am using the PHP SDK, and here is an excerpt of my code:

        $service = new NetSuiteService($config);
        $service->setSearchPreferences(false, 20);

        $lastModifiedSearchField = new SearchDateField();
        $lastModifiedSearchField->operator = "after";
        $lastModifiedSearchField->searchValue = date("Y-m-d", strtotime("yesterday")) . 'T00:00:00.000+02:00';

        $search = new CustomerSearchBasic();
        $search->lastModifiedDate = $lastModifiedSearchField;

        $output->writeln('Performing Customer Search');
        $request = new SearchRequest();
        $request->searchRecord = $search;
        $searchResponse = $service->search($request);

Nada_Surf
  • 616
  • 1
  • 7
  • 19
  • 1
    A quick partial fix would be to get them to only update Customer records where the balance owed has changed. I doubt the amount owing for every customer changes every day. A common way to make NetSuite painfully slow is to touch records that don't need to be in scheduled scripts or mass updates. – Brian Dec 04 '19 at 19:57

0 Answers0