Friday, 4 December 2015

To Find the phone number of the customer:


    LogisticsElectronicAddress LogisticsElectronicAddress;
    DirPartyLocation DirPartyLocation;
    int contactPhoneCounter = 0;

    while select Locator from LogisticsElectronicAddress exists join DirPartyLocation
    where
    DirPartyLocation.Party == _custInvoiceJour.custTable_InvoiceAccount().Party
    &&
    DirPartyLocation.location == LogisticsElectronicAddress.location
    && LogisticsElectronicAddress.type == LogisticsElectronicAddressMethodType::Phone
    {
        contactPhoneCounter++;
        if (contactPhoneCounter==1)
        {
                cachedCompanyContactPhone1 = LogisticsElectronicAddress.Locator;
        }
        else if (contactPhoneCounter==2)
        {
            cachedCompanyContactPhone2 = LogisticsElectronicAddress.Locator;
        }
        else
        {
            break;
        }
    }

No comments:

Post a Comment