The field 'Inventory' cannot be located. Removing fields is not allowed.

kuhikuhi Member Posts: 13
Trying to add a field in Transfer Order Subform that shows the "Remaining Quantity" from "Item Ledger Entry".

Filtered by Open=true, Displaying the correct "Item No." and "Location Code" filtered by "Transfer-to Code".

This is my "Transfer Line" table extension:
tableextension 50100 "TransferLineExt" extends "Transfer Line" //5741
{
    fields
    {
        field(50100; Inventory; Integer)
        {
            Caption = 'Inventory';
            FieldClass = FlowField;            
            CalcFormula = sum("Item Ledger Entry"."Remaining Quantity" where ("Item No." = field("Item No."), 
                                                                              Open = filter(true),
                                                                              "Location Code" = field("Transfer-to Code")
                                                                            ));
        }
    }
}

This is my "Transfer Order Subform" page extension:
pageextension 50100 "TransferOrderSubformExt" extends "Transfer Order Subform" //5741
{    
    layout
    {
        addlast(Control1)
        {       
            field("Inventory"; Inventory)
            {
                ApplicationArea = All;
            }
        }
    }   
}

When I try to compile I get this error:
[2022-02-14 04:29:14.58] The request for path /BC/dev/apps?tenant=default&SchemaUpdateMode=synchronize&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: TableExtension TransferLineExt :: The field 'Inventory' cannot be located. Removing fields is not allowed.
See more at https://go.microsoft.com/fwlink/?linkid=2002422.

Best Answer

  • kuhikuhi Member Posts: 13
    Answer ✓
    Solved I had to add
    "schemaUpdateMode": "ForceSync"
    

    Thanks for the Decimal observation @bbrown :smile:

Answers

Sign In or Register to comment.