website logo
Product Overview
NetSuite
Payments
QuickBooks
Xero
Navigate through spaces
⌘K
General Concepts
What is Breadwinner
Getting Started
App Installation
Initial Configuration
Person Accounts
Company Matching
Product Matching
NetSuite Items and Item Groups
Download PDF button
Weekly Sync Timeframe
Security and Permissions
NetSuite Permissions
Custom Guided Wizard
Quick Create Sales Order
Button URL Structure
NetSuite Company Creation
Button URL Generator
Support
Custom Fields
Custom Objects
Global API
Quick Start Guide
API Overview
Requests
Response
Apex Generator
Code Examples
Advanced Topics
Formula Fields
NetSuite Discounts
NetSuite Payment Terms
Memorized Transactions
Sync Data Filtering
Technical Resources
Deploy Plan
Requirements
ERD / Object Structure
Getting Help
Version History
Direct Installation Link
Docs powered by
Archbee
Advanced Topics

Sync Data Filtering

12min



Sync data can be filtered using two primary methods.

  • Date Filtering
  • Custom Field 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).

Warning: Do Not Filter key fields

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

Retrieving and Setting Filter Values

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.

SOQL
|
select 
    id, Name, 
    breadwinner_ns__Additional_Where_Filter__c, 
    breadwinner_ns__NetSuite_Object_Label__c 
from breadwinner_ns__BW_NetSuite_Object__c 
where breadwinner_ns__NetSuite_Object_Label__c in ('Customer','Vendor','SalesOrder')




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.

SOQL
|
Query Result:
"Id"	    "Name"	                        "breadwinner_ns__Additional_Where_Filter__c"	    "breadwinner_ns__NetSuite_Object_Label__c"
"a0I..."	"0001 - Customer - 0001"	    "cf_boolean_custentity_sync_with_salesforce=true"	"Customer"
"a0I..."	"0001 - Vendor - 0001"	        "cf_boolean_custentity_sync_with_salesforce=true"	"Vendor"
"a0I..."	"0001 - SalesOrder - 0001"	    "cf_boolean_custbody_sync_with_salesforce_so=true"	"SalesOrder"
"a0I..."	"Breadwinner US - SalesOrder"	"cf_boolean_custbody_sync_with_salesforce_so=true"	"SalesOrder"
"a0I..."	"Breadwinner UK - Customer"	    "cf_boolean_custentity_sync_with_salesforce=true"	"Customer"
"a0I..."	"Breadwinner UK - Vendor"	    "cf_boolean_custentity_sync_with_salesforce=true"	"Vendor"
"a0I..."	"Breadwinner UK - SalesOrder"	"cf_boolean_custbody_sync_with_salesforce_so=true"	"SalesOrder"
"a0I..."	"Breadwinner BV - Customer"	    "cf_boolean_custentity_sync_with_salesforce=true"	"Customer"
"a0I..."	"Breadwinner BV - Vendor"	    "cf_boolean_custentity_sync_with_salesforce=true"	"Vendor"
"a0I..."	"Breadwinner BV - SalesOrder"	"cf_boolean_custbody_sync_with_salesforce_so=true"	"SalesOrder"
"a0I..."	"Breadwinner US - Customer"	    "cf_boolean_custentity_sync_with_salesforce=true"	"Customer"
"a0I..."	"Breadwinner US - Vendor"	    "cf_boolean_custentity_sync_with_salesforce=true"	"Vendor"


Date is more tricky as you need to use EPOCH time. Converter here: unixtimestamp.com eg. 1-1-2021 at midnight EST is 1577854801

Examples

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

How To Guide

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.

Accessing the "Additional Where Filter" field via a Report

Find the object using the Object Manager

Document image


Ensure that Reports are enabled for this object.

Document image


Create a Report, selecting the Report Type "NetSuite Objects"

Document image


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.

Document image


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).

Document image


Data Hygiene after modifying any "Additional Where Filter" fields

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.

Document image




Updated 25 Aug 2023
Did this page help you?
PREVIOUS
Memorized Transactions
NEXT
Technical Resources
Docs powered by
Archbee
TABLE OF CONTENTS
Custom Field Filtering
Warning: Do Not Filter key fields
Retrieving and Setting Filter Values
Examples
How To Guide
Accessing the "Additional Where Filter" field via a Report
Data Hygiene after modifying any "Additional Where Filter" fields
Docs powered by
Archbee