Link

URL Structure

The URL will always start with a specific line, and contain at minimum two elements, specifying the originating record, and the associated Salesforce Account (or a NetSuite Customer, as noted below)

It is not necessary to add [naX.salesforce.com] or anything similar; the button can simply start with /apex/….

/apex/breadwinner_ns__CreateSalesOrder    
?originating_record={!salesforce_record_ID}
&parent_account=api_field_name__c    

The above presumes you are creating a record under a Salesforce Account (which in turn will look for, or create, a NetSuite Customer under that Salesforce Account). Less common, but equally valid, you might wish to create a NetSuite record under a NetSuite Customer directly. In that case, your URL should look like

/apex/breadwinner_ns__CreateSalesOrder                           
?originating_record={!salesforce_record_ID}                      
&netsuite_customer=api_formula_or_lookup_to_netsuite_customer__c 

However, as this is the less common case, the rest of this document will presume that you are creating a record under a Salesforce Parent Account

Please note that the only field that should contain a Salesforce ID is the originating record field. Additionally, this is the only field that will contain brackets, {}. All other fields will contain the API name of the field, without brackets. The API name is easiest copied from the Salesforce Setup page showing all the fields on the originating object.

Testing

When building the URL, we recommend using &testing=true to access our testing page. You can temporarily build this into the URL formula, or append it to the URL after you click on the New Sales Order Button. This testing page will display the API names we have passed and the corresponding values we have retrieved based on the API names. It is only visible to Salesforce Admins, and only visible if testing is set to True.

/apex/breadwinner_ns__CreateSalesOrder  
?originating_record={!salesforce_record_ID}
&parent_account=api_field_name__c         
&testing=true