Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

51 Purchase Invoice, trying to print dimension values for each line in the grid

Posted on by 70

Hello,

I'm just trying to find some example code in C/AL to print the dimension values for each line for Page 51 Purchase Invoice. I assume I have to use the Dimension Management codeunit to do this, but not sure how to print these values in a MESSAGE(). I can access the Shortcut dims 1 and 2 from the Record object, but I need to be able to get the other dimensions as well.

thanks

  • Moony253 Profile Picture
    Moony253 70 on at
    RE: 51 Purchase Invoice, trying to print dimension values for each line in the grid

    Hello Manish,

    I added an action button to the Purchase Invoices Page and in that method I just want

    a MESSAGE method, so this isn't C/AL code but something like

    do

    {

    MESSAGE('print here')

    } while ()

    I am sorry, I don't have much experience in C/AL coding, but I know C#. I'm trying to get the line item dimensions for Purchase Line and iterate through all dimensions for all lines.

    thank you so much

  • ManishS Profile Picture
    ManishS 6,578 on at
    RE: 51 Purchase Invoice, trying to print dimension values for each line in the grid

    Where do you want to print the dimension ? A factbox or a report.

  • Moony253 Profile Picture
    Moony253 70 on at
    RE: 51 Purchase Invoice, trying to print dimension values for each line in the grid

    Hi Teddy,

    thank you for the reply, is there any way you could provide example c/al code? I'm trying to iterate through each Purchase Line for Purchase Invoices and print each value for all dimensions per line.

    thank you so much

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,861 Moderator on at
    RE: 51 Purchase Invoice, trying to print dimension values for each line in the grid

    Get the dimension set ID from the record, and the go to Dimension Set Entry table and retrieve the dimensions.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,556 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,625 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans