Page 1 of 1

current address property names.

Posted: Wed Jul 17, 2019 9:48 am
by shawnregan
I am looking at setting the following fields and need to know the property names.

See attached image.

I need to over ride the current address checkbox and the address values in the screen shot. This is the seller contact.

Re: current address property names.

Posted: Wed Jul 17, 2019 10:58 am
by BobRichards
There are two ways to determine the names of fields for open orders in the Select UI.
  • Use the Field Code Browser (FCB). You can click the "Track Current Field" button (looks like chain links) at the top of the FCB then click in field in the order. The FCB will then update to show the field's location in the order model. However, this will not update if your are in a popup box.
  • You can always press ALT+F6 to see the field information. This displays the same information as the FCB.

Re: current address property names.

Posted: Wed Jul 17, 2019 11:49 am
by shawnregan
Ah yes (FCB). thanks for the tip!

Re: current address property names.

Posted: Fri Jul 19, 2019 11:50 am
by shawnregan
My values are not being saved.

dynamic dSeller = CreateNewObject(Constants.ObjectTypes.SELLER, tState);

dSeller.AddressIsPropertyAddress = false;
dSeller.Address.Address1 = seller.ForwardingAddress?.Address1;
dSeller.Address.City = seller.ForwardingAddress?.City;
dSeller.Address.County = seller.ForwardingAddress?.County;
dSeller.Address.Zip = seller.ForwardingAddress?.Zip;
2019-07-19_0849.png
2019-07-19_0849.png (5.19 KiB) Viewed 3018 times

Re: current address property names.

Posted: Fri Jul 19, 2019 1:20 pm
by BobRichards
When you create a new object, you need to add it to the order. In your example, if you create a new contact (Seller), you need to add it the the order contacts.

Code: Select all

IOrderItem newSeller = CreateNewObject(Constants.ObjectTypes.SELLER, tState);
((IList)order.Contacts).Add(newSeller);

dynamic dSeller = newSeller;
dSeller.AddressIsPropertyAddress = false;