Views [dbo].[CustomerAddressPhoneNumbers_XLedger]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created3:09:18 PM Tuesday, June 24, 2025
Last Modified3:09:18 PM Tuesday, June 24, 2025
Columns
Name
CustomerJoinField
CustomerAddressJoinField
PhoneNumber1
PhoneNumber2
PhoneNumber3
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
/**
* Do NOT access this view by this view name.  Instead, use the vCustomerAddressPhoneNumbers_Synonym which will either
* point to this view or to the vCustomerAddressPhoneNumbers_Legacy as appropriate for that system.
*
* IMPORTANT -- READ ON
* ====================
* This view MUST return the same named columns and data types and in the same order as the
* vCustomerAddressPhoneNumbers_Legacy view, which is why they can be hot swapped when XLedger is
* activated/deactivated.
*/

create view [dbo].[CustomerAddressPhoneNumbers_XLedger]
(
    CustomerJoinField,
    CustomerAddressJoinField,
    PhoneNumber1,
    PhoneNumber2,
    PhoneNumber3
)
as
select
    CustomerJoinField = AccountingCustomerAddress.AccountingCustomerFid,
    CustomerAddressJoinField = AccountingCustomerAddress.AccountingCustomerAddressId,
    -- XLedger doesn't have any phones at the address level.
    PhoneNumber1 = convert( varchar(30), null ),
    PhoneNumber2 = convert( varchar(30), null ),
    PhoneNumber3 = convert( varchar(30), null )
from AccountingCustomerAddress
GO
GRANT SELECT ON  [dbo].[CustomerAddressPhoneNumbers_XLedger] TO [MssExec]
GRANT INSERT ON  [dbo].[CustomerAddressPhoneNumbers_XLedger] TO [MssExec]
GRANT DELETE ON  [dbo].[CustomerAddressPhoneNumbers_XLedger] TO [MssExec]
GRANT UPDATE ON  [dbo].[CustomerAddressPhoneNumbers_XLedger] TO [MssExec]
GO
Uses