How can I get ctDynamicsSL (CTAPI) to default the billing/shipping address for an order?


By default the service expects you to populate the address information in the order header object and it will use whatever you set there to create the order, ignoring the values in the shipToID.  However this behavior is toggle-able as an xml Config file value.

In your xml config file:  (usually: c:\inetpub\xctfiles\config\DSLCONFIGFILE.XML)
You should see this:
<CONFIGITEM ID='OVERWRITEORDERHEADERDEFAULTS' ENCRYPTED='False' COMMENTS=''>TRUE</CONFIGITEM>
Change that to:
<CONFIGITEM ID='OVERWRITEORDERHEADERDEFAULTS' ENCRYPTED='False' COMMENTS=''>FALSE</CONFIGITEM>
Note: If this key (OVERWRITEORDERHEADERDEFAULTS) does not exist in the file, just add the new key underneath the <CONFIGVALUES> section of the file.

The system will now default all the shipping address values to the shipToID and the billing address values to the customer record in SL. 
Those fields will only be overwritten if you manually set the corresponding value in the order object.

Note: once edited you will need to reset the IIS application for the web service or "touch" the web.config file to reset the values an force the library to reload the xml config file (it is cached in memory).