Skip to main content

Notifications

Announcements

No record found.

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 50

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

  • sha212 Profile Picture
    sha212 50 on at
    RE: The filter "@<Buy from Vendor No.>" on the Buy-from Vendor No. field in Purchase Header table has no lower bound

    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.

  • sha212 Profile Picture
    sha212 50 on at
    RE: The filter "@<Buy from Vendor No.>" on the Buy-from Vendor No. field in Purchase Header table has no lower bound

    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.

  • Suggested answer
    jcastro Profile Picture
    jcastro 2,245 on at
    RE: The filter "@<Buy from Vendor No.>" on the Buy-from Vendor No. field in Purchase Header table has no lower bound

    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,

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,749 on at
    RE: The filter "@<Buy from Vendor No.>" on the Buy-from Vendor No. field in Purchase Header table has no lower bound

    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;

  • sha212 Profile Picture
    sha212 50 on at
    RE: The filter "@<Buy from Vendor No.>" on the Buy-from Vendor No. field in Purchase Header table has no lower bound

    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
    Suresh Kulla 43,749 on at
    RE: The filter "@<Buy from Vendor No.>" on the Buy-from Vendor No. field in Purchase Header table has no lower bound

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

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

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans