web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

The filter "@<Buy from Vendor No.>" on the Buy-from Vendor No. field in Purchase Header table has no lower bound

(0) ShareShare
ReportReport
Posted on by 60

Hi,

I am getting above error while trying to change the 'Buy from Vendor No.' in purchase order.

Steps to recreate the error:

1. Open the purchase order list.

2. Then add a filter of a "Buy-from Vendor No.".

3. I chose one of the purchase order from the filtered list.

4.In the card I when I tried to change the 'Buy from Vendor No.', its giving following error.

When I debugged, its showing error in IF GETRANGEMIN("Buy-from Vendor No.") = GETRANGEMAX("Buy-from Vendor No.") THEN of Skipinitialization() function.

Can you please help?

*This post is locked for comments

  • Suggested answer
    Suresh Kulla Profile Picture
    50,280 Super User 2026 Season 1 on at

    Add the IF before IF GETRANGEMIN.... condition like

    IF GETFILTER("Buy-From Vendor No.") <> '' THEN

  • sha212 Profile Picture
    60 on at

    The condition   IF GETFILTER("Buy-From Vendor No.") <> '' THEN     is there already. I have not made any changes to skipintialization() function.  

  • Suggested answer
    Suresh Kulla Profile Picture
    50,280 Super User 2026 Season 1 on at

    I don't see that call in the newest version. I believe you can comment that. This is how the code in the newest version, in the OnInsert trigger

                  InitInsert;

                  IF GETFILTER("Buy-from Vendor No.") <> '' THEN

                    IF GETRANGEMIN("Buy-from Vendor No.") = GETRANGEMAX("Buy-from Vendor No.") THEN

                      VALIDATE("Buy-from Vendor No.",GETRANGEMIN("Buy-from Vendor No."));

                  IF "Purchaser Code" = '' THEN

                    SetDefaultPurchaser;

  • Suggested answer
    jcastro Profile Picture
    2,245 on at

    Hello sha212,

    Instead of filtering the P.O., you can try sort by the buy-from vendor No. and use the search feature to find your purchase order. After that enter the card and make your change (not having filtered the list previously).

    Best regards,

  • sha212 Profile Picture
    60 on at

    Currently OnInsert tigger following code is there.

    IF NOT SkipInitialization THEN

     InitInsert;

    IF GETFILTER("Buy-from Vendor No.") <> '' THEN

     IF GETRANGEMIN("Buy-from Vendor No.") = GETRANGEMAX("Buy-from Vendor No.") THEN

       VALIDATE("Buy-from Vendor No.",GETRANGEMIN("Buy-from Vendor No."));

    I commented the first line still getting error.

  • sha212 Profile Picture
    60 on at

    Hello José ,

    It worked. Thank you.

    Another way is to filter using 'Pay to Vendor No.' and then change in the card. I am not sure why Buy from Vendor No. is not working.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans