Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

Retail POS - Customer account payment

(0) ShareShare
ReportReport
Posted on by 674

Hi All,

I tried to test the payment with customer account in a retail POS. However I received the following message

"Customer ... does not exist or its acocunt is blocked"

2020_2D00_11_2D00_18-10_5F00_56_5F00_55_2D00_Dynamics-Retail-POS-and-7-more-pages-_2D00_-Work-_2D00_-Microsoft_0B20_-Edge.png

However, this customer is not blocked at all. Also, of course this customer exists in CustTable as well.

I debugged the related pieces of code and found that  the record is not retrieved from the database even if  the _custAccount (004009) was passed to this find() method correctly. 

    static CustTable find(CustAccount   _custAccount,
                          boolean       _forUpdate = false)
    {
        CustTable custTable;

        if (_custAccount)
        {
            if (_forUpdate)
            {
                custTable.selectForUpdate(_forUpdate);
            }

            select firstonly custTable
                index hint AccountIdx
                where custTable.AccountNum == _custAccount;
        }

        return custTable;
    }

What is the way to solve it? Should I set a real-time service profile in order to make it work? 

Thank you. 

  • ShawnDEV Profile Picture
    ShawnDEV 674 on at
    RE: Retail POS - Customer account payment

    Hi,

    I already debugged that method you mentioned and if I step into methods called from this method, I come down to CustTable find () ..

    Then the record is not retrieved although the parameter is passed correctly..

    I can restart IIS but I don't think that will solve the issue.. But will try..

  • Suggested answer
    Guanghui Profile Picture
    Guanghui on at
    RE: Retail POS - Customer account payment

    The code is here:

    class\RetailTransactionServiceCustomer

    public static container validateCustomerStatus(CustAccount _custAccount, AmountMST  _salesAmount, CurrencyCode _currencyCode)

       {

           container   custStatus = [false,0];

           AmountMST   creditMax = 0;

           TypeOfCreditmaxCheck creditMaxCheck = CustParameters::find().CreditMaxCheck;

           #Define.UserTab('\t')

           if (_currencyCode != CompanyInfoHelper::standardCurrency())

               _salesAmount = CurrencyExchangeHelper::amountCur2MST(_salesAmount, _currencyCode);

           try

           {

               if (!CustTable::checkExistAndOpen(_custAccount, _salesAmount))

               {

                   custStatus = [false,strFmt("@RET4170018", _custAccount)];

               }

        }

    Please check the database and determine if CustTable::checkExistAndOpen(_custAccount, _salesAmount)) will return true, and restart IIS or SQL server service if necessary

  • Guanghui Profile Picture
    Guanghui on at
    RE: Retail POS - Customer account payment

    How about other tender type, such as pay cash, credit card?

    can you run job to push the customer  data into channel database if you are sure customer is not blocked?

    can you show what's the call-stack which contains the CustTable.find() 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans