---
title: Button URL Structure
slug: netsuite/button-url-structure
description: Learn how to create a Button URL for Salesforce that meets the necessary requirements and includes essential parameters using this document. Discover the importance of starting the URL with a specific line, omitting the Salesforce domain, and utilizing AP
docTags: 
createdAt: 2021-10-28T13:03:18.000Z
---

## Introduction

The Button URL always starts with a specific line and contains a minimum of two parameters: the originating record and the associated Salesforce Account.

It is not required to add \[naX.salesforce.com] or anything similar, the button can simply start with /apex/...

:::CodeblockTabs
Button URL

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

The above URL 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).&#x20;

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

## Testing

While building the URL, we recommend using a suffix *\&testing=true* to look at 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 you have passed and the corresponding values Breadwinner retrieved based on the API names. It acts as a confirmation page and is visible only when *testing* is set to *true*.&#x20;

:::CodeblockTabs
Button URL

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


Once you review and feel confident, you may remove the *\&testing=true* from the Button URL.

## Automated Button URL Generation

You can also use the Breadwinner provided [Button URL Generator](docId\:lOaHvbU12-aKyzGp0vs6O) to auto-generate the Button URL for all the supported transactions.




