Views [dbo].[CustomerAddressInformation_XLedger]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created9:18:42 AM Wednesday, October 15, 2025
Last Modified9:18:42 AM Wednesday, October 15, 2025
Columns
Name
CustomerFid
CustomerAddressId
CustomerNumber
AddressCode
Address1
Address2
Address3
City
State
PostalCode
CountryName
Contact
CustomerJoinField
CustomerAddressJoinField
CountryCodeStandardFID
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
/**
* Don't use this view directly but instead use CustomerAddressInformation_Synonym.
* CustomerAddressInformation_Synonym will either point to this view or to
* CustomerAddressInformation_Legacy if that is active.
*/
create view [dbo].[CustomerAddressInformation_XLedger]
(
    CustomerFid,
    CustomerAddressId,
    CustomerNumber,
    AddressCode,
    [Address1],
    [Address2],
    [Address3],
    City,
    [State],
    PostalCode,
    CountryName,
    Contact,
    CustomerJoinField,
    CustomerAddressJoinField,
    CountryCodeStandardFID
)
as
select
    CustomerFid = AccountingCustomer.AccountingCustomerId,
    CustomerAddressId = AccountingCustomerAddress.AccountingCustomerAddressId,
    CustomerNumber = AccountingCustomer.CustomerNumber,
    AddressCode = dbo.GetAccountingCustomerAddressTypeAddressCode( AccountingCustomerAddressType.TypeName ),
    [Address1] = AccountingCustomerAddress.[Address1],
    [Address2] = AccountingCustomerAddress.[Address2],
    [Address3] = AccountingCustomerAddress.[Address3],
    City = AccountingCustomerAddress.City,
    [State] = AccountingCustomerAddress.[State],
    PostalCode = AccountingCustomerAddress.PostalCode,
    CountryName = CountryCodeStandard.VanlineCountryCode,
    Contact = AccountingCustomer.Contact,
    CustomerJoinField = AccountingCustomer.AccountingCustomerId,
    CustomerAddressJoinField = AccountingCustomerAddress.AccountingCustomerAddressId,
    CountryCodeStandardFID = AccountingCustomerAddress.CountryCodeStandardFID
from AccountingCustomer
inner join AccountingCustomerAddress on AccountingCustomerAddress.AccountingCustomerFid = AccountingCustomer.AccountingCustomerId
inner join AccountingCustomerAddressType on AccountingCustomerAddressType.AccountingCustomerAddressTypeId = AccountingCustomerAddress.AccountingCustomerAddressTypeFid
left outer join CountryCodeStandard on CountryCodeStandard.CountryCodeStandardID = AccountingCustomerAddress.CountryCodeStandardFID
GO
GRANT SELECT ON  [dbo].[CustomerAddressInformation_XLedger] TO [MssExec]
GRANT INSERT ON  [dbo].[CustomerAddressInformation_XLedger] TO [MssExec]
GRANT DELETE ON  [dbo].[CustomerAddressInformation_XLedger] TO [MssExec]
GRANT UPDATE ON  [dbo].[CustomerAddressInformation_XLedger] TO [MssExec]
GO
Uses