Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Finding Fields from Source Expression

Posted on by 350

There is a field named Invoice Discount % on the Sales Quote Card.

mibuso.PNG

I need to show this field's value in the Sales Quote (Report 206) but I can't find this field in either the Sales Header or Sales Line. It shows in the SourceExpression. The screenshot I attached above is from Tab SourceExpression. How do I locate this field?

Thanks a lot in advance.

*This post is locked for comments

  • mysamza Profile Picture
    mysamza 350 on at
    RE: Finding Fields from Source Expression

    How do you suggest I access the field's value that is calculated at CodeUnit 56 that is Sales - Calc Discount By Type? I tried making a global variable of type Codeunit and tried accessing VarCreated.GetCustInvoiceDiscountPct(RECORDREF) but it would tell me RECORDREF should belong to 37 and not 0.

    Thank you in advance for pointing me in the direction I can get this figured out!

  • Andrea Antoniazzi Profile Picture
    Andrea Antoniazzi 285 on at
    RE: Finding Fields from Source Expression

    Hi,

    the "Invoice Discount %" is not a field, so is calculated with a function.

    If you look in the page 95 "Sales Quote Subform" you can find the variable InvoiceDiscountPct.

    This variable is calcualated with this code:

    InvoiceDiscountPct := SalesCalcDiscByType.GetCustInvoiceDiscountPct(Rec);

    SalesCalcDiscByType is a global variable on codeunit "Sales - Calc Discount By Type"

    Best regards

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Finding Fields from Source Expression

    The invoice discount % is not a standard NAV. It is probably calculated on the open page.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans