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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error while creating flow field CalcFormula in Visual studio code

(0) ShareShare
ReportReport
Posted on by 2,582

Hi all,

I have created a new tableextension object using Visual studio code which extends Item table. 

I have created a field which is a flow field.

I have coded the following:

field(70000000;"Control Sample Qty";Decimal)
{
Editable=False;
FieldClass=FlowField;
DecimalPlaces=0:5;
CalcFormula=Sum(ControlStabilitySample."Sample Qty" WHERE ("Item No."=FIELD("No."),Status=FILTER(<>"QC Completed"),"Sample Type"=CONST("Control Sample"),"Loan License No."=FILTER(='')));
}

where, 'ControlStabilitySample' is a new table I have created in Visual studio code.

But the CalcFormula statement give me following error:

error AL0999: Internal error: 'Object reference not set to an instance of an object.', Stack trace=unknown

Kindly suggest the solution to this.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,961 Super User 2025 Season 2 on at
    RE: Error while creating flow field CalcFormula in Visual studio code

    I doubt of using Status=FILTER(<>"QC Completed")

    Try removing <> to confirm whether it is causing issue.

    you need to add remaining options instead of <>

  • Tina Menezes Profile Picture
    2,582 on at
    RE: Error while creating flow field CalcFormula in Visual studio code

    Hi, I checked it.

    <> is not giving error.

    Basically "Item No."=FIELD("No.") is creating error. If I remove this expression the error goes away, but I want this expression to be present.

    How to solve this?

  • Suggested answer
    Mohana Yadav Profile Picture
    60,961 Super User 2025 Season 2 on at
    RE: Error while creating flow field CalcFormula in Visual studio code

    I hope "Item No." is a field in your new table.

    it could be an issue.

    please report here

    github.com/.../issues

  • Tina Menezes Profile Picture
    2,582 on at
    RE: Error while creating flow field CalcFormula in Visual studio code

    Hi,

    Yes it is a field in my new table. It is related to Item table.

    I have added a code snippet of it.

    table 70000002 SamplingQuantityTable

    {

       fields

       {

       field(1;"Item No.";Code[20])

       {

           TableRelation=Item;

       }

    }

  • Verified answer
    Tina Menezes Profile Picture
    2,582 on at
    RE: Error while creating flow field CalcFormula in Visual studio code

    Hi all,

    I put up this issue on Github. I received a reply that 'Unfortunately this is a bug in the preview. The good news is that it is already fixed and will be available in the next update.'

    You can refer this link:

    github.com/.../52

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans