Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

Posted on by 180

Create New fields in Item Master. Create the same new fields in Purchase Line 
On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order 

I am able to populated in purchase order. but, I need help on the condition only if  purchase order type is order.

*This post is locked for comments

  • Verified answer
    Sathish C Profile Picture
    Sathish C 180 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    0841.112.PNG

  • Sathish C Profile Picture
    Sathish C 180 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    No it dos not have anywhere else.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,137 Super User 2024 Season 2 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    Are you getting message Order only when type is Invoice?

    then please check if same code is existing some where else also.

    you can add another message inside IF condition to see whether it is executing when type is Invoice.

  • Sathish C Profile Picture
    Sathish C 180 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    I am getting message box as 'Order'.

    but still when I give Purchase order type as Invoice its auto populating.

    I want,  only if Purchase order type is Order it should auto populate.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,137 Super User 2024 Season 2 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    simply add below message before your code and see what message are you getting.

    Message('%1',PurchHeader."Document Type");

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,137 Super User 2024 Season 2 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    are they not auto populating after adding above code?

    do you have GetPurchHeader; code anywhere before your code in No. Onvalidate trigger?

    if not add

    GetPurchHeader; before IF condition.

  • Sathish C Profile Picture
    Sathish C 180 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    On selecting the Item in Purchase order line,the values should be auto populated in purchase order.

    The condition is only when if the Purchase order type is Order.

    i am able to auto populate. i did the code in table 39 (Purchase Line)  no. OnValidate trigger. but i am not able to filter only when if the Purchase order type is Order it should auto populate.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,137 Super User 2024 Season 2 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    please mention which scenario is not working.

  • Sathish C Profile Picture
    Sathish C 180 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    No bro I tried. Can you suggest any other Idea..??

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,137 Super User 2024 Season 2 on at
    RE: On selecting the Item in Purchase order line (if the PO type is Order) the values should be auto populated in purchase order as shown below

    you need to add BEGIN at the end of IF statement as you have more than one line

    END after Vendor Item No.

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