Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

DropDown

Posted on by 3,027

Hi

 In a report i have dropdown which shows Import Vendors & Export Vendors.  I want if user selects Import then in another dropdown list of those Vendors should appear which have Vendor Posting Group Dom.

If Export is selected then list of those Vendors should appear which have Vendor Posting Group Exp.

Thanks

*This post is locked for comments

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: DropDown

    Why do not just name the posting groups accordingly and let users select the posting groups themselves?

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

       What should be the DataType of second variable . If i give Record it gives message

    The Control VendList(1) has an invalid DataType record. On request page i have also given VendList.

    Thanks

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: DropDown

    Once you selected the value in First dropdown based on that variable value you can write your code onlookup trigger of second variable to show the values.

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

     I have created 1 C/AL Global with option DataType. Values are Export & Domestic. What next i should do . I want if Export is selected then Vendor with Gen Bus Posting Group Dom should be displayed . What should be the variable DatatType.

    Currently i have created C/Al variable with Code DataType . In Request Page on properties i have set TableRelation. Similar thing i wanted in above case.

    Thanks

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: DropDown

    Something like this

                ItemCrossReference.RESET;

               ItemCrossReference.SETCURRENTKEY("Cross-Reference Type","Cross-Reference Type No.");

               ItemCrossReference.SETFILTER(

                 "Cross-Reference Type",'%1|%2',

                 ItemCrossReference."Cross-Reference Type"::Customer,

                 ItemCrossReference."Cross-Reference Type"::" ");

               ItemCrossReference.SETFILTER("Cross-Reference Type No.",'%1|%2',SalesHeader."Sell-to Customer No.",'');

               IF PAGE.RUNMODAL(PAGE::"Cross Reference List",ItemCrossReference) = ACTION::LookupOK THEN BEGIN

                 VALIDATE("Cross-Reference No.",ItemCrossReference."Cross-Reference No.");

               END;

    You need to use Vendor Posting Group Record and Page instead of Item Cross Reference and apply necessary filter on Vendor Posting Group based on your selection

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: DropDown

    Hi

      Yes these are not table fields . Can u give some sample code how this can be done

    Thanks

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: DropDown

    I believe these fields are not table fields but variables added on the request page, you need to add the code OnLookUp of the Vendor Posting Group Field to filter based on your other selection.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans