web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Getting calculated fields value in NAV

(0) ShareShare
ReportReport
Posted on by 100

Hi there

I get a record of type VendorLedgerEntry this way:

VendorLedgerEntry.GET(2278);

The Record has a column "Amount" of type FlowField and has a CalcFormula like SUM(.....)

The retrieved Record assigned to VendorLedgerEntry variable has no Value in the column "Amount", the return value es '0'

Can I execute the CalcFormula after obtain the Record? or... Can I obtain the record with the field filled with the calculation result value?

Thanks everyone!

Pablo from Paraguay

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Roberto Stefanetti Profile Picture
    12,998 on at

    hi,

    you need calculate flowfields to get calculate values.

    example

    Codeunit 50001 TestCalcfields

    Local Variables

    recVendorLedgerEntry record Vendor Ledger Entry

    OnRun()

    recVendorLedgerEntry.GET(2551);    --> obtain record (GET is like FIND on primary key)

    MESSAGE('Amount : ' + FORMAT(recVendorLedgerEntry.Amount));

    --> Result 0

    recVendorLedgerEntry.CALCFIELDS(Amount);  --> calculate flowfield

    recVendorLedgerEntry.CALCFIELDS(Remaining Amt. (LCY)) etc. etc.  --> calculate flowfield

    MESSAGE('Amount : ' + FORMAT(recVendorLedgerEntry.Amount));

    --> Result "Amount value" > ex. 50.240

  • PabloRpy Profile Picture
    100 on at

    Roberto, it works!

    I'm very grateful for your help!

    A hug from Py.

  • Thanh Profile Picture
    5 on at

    Thanks. Very helpful. ^_^

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans