Sync Data Filtering
Sync data can be filtered using two primary methods.
- Date Filtering
- Custom Field Filtering
Custom Field Filtering is where Data on the standard sync process is filtered by using a custom field. This is the most flexible means of filtering as you can define the fields to filter in Breadwinner and set automation criteria to set the filter in NetSuite. A simple example is a "Sync to Salesforce" checkbox.
Example: Sync to Salesforce checkbox Using a custom field in NetSuite "Sync to Salesforce", which is applied to NetSuite Customer (Entity) and NetSuite Sales Order (Sales).
Some fields are key to the Breadwinner's internal processes. These should not have any "where filters" applied to them
Classification Currency Department Employee InventoryLocation Item Location PriceLevel Subsidiary
SOQL statement to retrieve all current filter settings for Customer, Vendor, and SalesOrder objects. You can change this as needed for the objects you want to modify filters on.
Here is a typical SOQL response from the above, where filtering has been set up. Notice the Additional Where Filter column is how to set up for Checkbox (boolean true/false) filtering.
Date is more tricky as you need to use EPOCH time. Converter here: unixtimestamp.com eg. 1-1-2021 at midnight EST is 1577854801
Value of breadwinner_ns__Additional_Where_Filter__c field: dateCreated>1664582400 This will filter any records prior to 10/1/2022 with this statement. It's just the value, no single (') or double (") quotes are needed.
If more than one criteria are needed, you can use +and+ to build more complex filters. The following shows how to indicate only records between 2 dates are to be retrieved: cf_date_custentity13>1606803100+and+cf_date_custentity13<1606805200
Please keep in mind that editing these fields, by design, requires some level of effort. This is because these powerful filters can be tricky to get right, and thus they are not exposed by default.
One way to access these fields is to create a Tab for the NetSuite Object object, and then use standard List Views to edit that field on each object/subsidiary combination. Views allow Mass Editing.
Another way, shown below, involves using Reports with Field Editing.
Find the object using the Object Manager
Ensure that Reports are enabled for this object.
Create a Report, selecting the Report Type "NetSuite Objects"
Ensure your report is filtered for "All NetSuite Objects" (not "My NetSuite Objects") and Subsidiary equals to connected NetSuite Org Id and show whatever fields you think necessary. We recommend the Subsidiary and the Additional Where Filter as columns.
For each record you want to set a filter for, click that line in the report to access the record representing that Subsidiary / Object combination. (Enable Field Editing on the report will not help you as the underlying field is a Long Text Field, which cannot be edited through a report).
After you have set a filter, there are some data hygiene tasks.
If you have added or changed a filter, it's possible that there are some records in Salesforce that need to be manually deleted. If so, run a historical sync (as per below) and then delete records with a Last-Modified date that is before the historical sync you have just run. Keep in mind that a historical sync might take up to 24 hours, or even multiple days in cases of massive NetSuite records.
In all situations, you should run a historical sync. Go to the Breadwinner for NetSuite, and the Troubleshoot > General section, and click on the respective object's sync button.