Setting State on a new order

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
dn_garza
Posts: 25
Joined: Wed Jan 10, 2024 11:16 pm

Setting State on a new order

Post by dn_garza »

StateCode.png
StateCode.png (76.99 KiB) Viewed 319 times


Is there a way, after casting an order to a dynamic object, to set 'State' on an address as in the screenshot provided?
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Setting State on a new order

Post by BobRichards »

States (like several others types) inherit from IValueType.

Code: Select all

// Get IState object.
IEnumManager enumMgr = ss.GetService<IEnumManager>();
IState state = enumMgr.GetEnum<IState>().Values.Where(t => t.Code == "TX").First();

...
o.SettlementLoction.Place.Address.State = state;
Bob Richards, Senior Software Developer, SoftPro
Post Reply