Custom Shipping and Billing
Sales order creation in NetSuite allows for custom shipping, billing addresses, and addressee.
When utilizing standard Salesforce source objects such as Order / Order Product, you may find standard fields such as BillingAddress and ShippingAddress, whose individual parts are not readily shown, can be used as shown below.
&billing_addressee=BW_Bill_To_Contact__c
&billing_addr1=BillingStreet
&billing_city=BillingCity
&billing_state=BillingState
&billing_country=BillingCountry
&billing_zip=BillingPostalCode
&shipping_addressee=BW_Ship_To_Contact__c
&shipping_addr1=ShippingStreet
&shipping_city=ShippingCity
&shipping_state=ShippingState
&shipping_country=ShippingCountry
&shipping_zip=ShippingPostalCodeFor lookup fields to Contact records, for Bill and Ship To Contact, you may need to make a formula field which properly creates a single Text field from the separate First Name and Last Name fields. Shown above as BW_Bill_To_Contact__c they are just Text formula fields.
Formula for Bill To Contact:
BillToContact.FirstName &
if(OR(ISBLANK(BillToContact.FirstName),ISNULL(BillToContact.FirstName)), ""," ") &
BillToContact.LastName
Formula for Ship To Contact:
ShipToContact.FirstName &
if(OR(ISBLANK(ShipToContact.FirstName),ISNULL(ShipToContact.FirstName)), ""," ") &
ShipToContact.LastNameIn the above examples, the formula concatenates the First and Last Names from the contact record. The added IF statement determines if a blank space is needed between the two fields, which only occurs when data is in the First name. This avoids the problematic addition of a leading space when only the Last Name is present.