I am attempting to programmatically alter the SettlementLocation using the API while the order is open (getting a reference to the active order). I come into the order with the default SettlementLocationType (Contact) and want to switch it to Other, then update the details.
After some trial and error I learned that one cannot directly write to the SettlementLocationType property on the Order.SettlementLocation object. Although it has a public SET, altering it raises a member access exception. What does seem to work, generally speaking, is to set
Code: Select all
Order.SettlementLocation.Place = Order.SettlementLocation.Other
The problem? The SPS Shell UI does not actually change the value of the radio button, causing my changes to be "invisible". Is something in the above incorrect? When I take this same approach server side without having the order open in the Shell, the changes play out as I hope, with the radio button showing settlement location type of Other on next order load.