AddressType in cls_Address? [Commerce 12.16]



I would like to run a SQL script (not preferable and not recommended, I know!) that removes all shipping addresses with "Box" in Line2. But I don't understand the AddressType in cls_Address. It is a Guid and different for all addresses? I can't find any relation to another table either.

How can I find out which addresses are shipment addresses?



Aug 28, 2019 17:32

Found out how it works. The table mcmd_SelectedEnumValue is the key.

To get all shipping addresses with Box in Line2 this is your code:

select * from cls_Address c
inner join mcmd_SelectedEnumValue s on s.[Key] = c.AddressType and s.Id = 2
where Line2 like '%box%'

Also described here:


Edited, Aug 30, 2019 12:01
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.