Summary

One order fails and the others are fine. The usual cause is a business rule that picks a Bill To or Ship To address out of the Address Book by a code, and no complete entry exists for that code. Add or finish the Address Book entry, or fix the rule, and process the order again.

Problem

You load or process one order and it fails, while every other order goes through normally. The failure follows that order and its destination, not the whole site. The screen shows:

Object reference not set to an instance of an object

Cause

A business rule is set up to fill in an address by looking up an Address Book entry by a code, such as an account or location code. If no entry exists for that code, or the entry exists but is missing something the carrier needs (name, full street address, country, state, or postal code), the lookup comes back empty and building the shipment fails with that message.

How to check: the failure happens only on orders that hit that rule for one destination. If the same message appears on many orders across several carriers at the same time, this is not your cause. That pattern is a server-side incident instead, and the related article covers it.

Fix

  1. Note the order that fails and the destination the rule is trying to fill in.
  2. Open the business rule that sets the address and find the Address Book Code it selects for that destination.
  3. Go to the Address Book and look for an entry with that exact code.
  4. If there is no entry, add one. If the entry is there but incomplete, fill in the name, full street address, country, state, and postal code, and save it.
  5. If the rule is pointing at the wrong code, correct the rule instead.
  6. Load the order again and process it.
  7. If that one order still fails, email support@shipstore.com and include the order number, the ship date, the rule name, and the Address Book Code, so the logs can be checked for the exact field the carrier request is missing.

What you should see

The order that was failing processes and prints a label, and other orders that use the same rule keep working.

Related articles

See also: "Rate shop error: Object reference not set to an instance of an object", "Cannot ship foreign-to-foreign: Object reference not set error", "Address Book entry won't save or import without an Address Book Code", and "Error Code: Object Reference Not Set to an Instance of an Object".