Open Forum

Expand all | Collapse all

How to block customer automatically.

  • 1.  How to block customer automatically.

    Posted 10 days ago
    Hi All,
    I need the code to bloc customer automatically  when Customer.Balance > Customer."Credit Limit (LCY)".
    Thanks

    ------------------------------
    Abdel

    ------------------------------
    Conference-BCNAVUG_200x200


  • 2.  RE: How to block customer automatically.

    TOP CONTRIBUTOR
    Posted 9 days ago
    If you are on versions prior to NAV2018 then, you would need to add the code in three places - on validate of  Balance field, Credit Limit field as well as on After get record for the Customer.

    If Customer.Balance > Customer.Credit Limit then
       Begin
         Customer. Blocked := TRUE;
         Customer. Modify(TRUE);
      END;

    In versions NAV2018 and above, you can create an event and call it every time these fields are validated.

    Hope this helps!
    ~Meenakshi


    ------------------------------
    Meenakshi Singh
    Senior Manager, Business Applications
    Home Market Foods, Inc.
    NAVUG Programming Committee
    ------------------------------

    Conference-BCNAVUG_200x200


  • 3.  RE: How to block customer automatically.

    Posted 9 days ago
    Hi Meenakshi,
    Thank you for your replay.
    It's ok


    ------------------------------
    Abdel DAHMANI
    Dynamics Nav Developer
    Freelancer
    ------------------------------

    Conference-BCNAVUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role