The Media Budget Line already exists when doing a DELETEALL

AlbertvhAlbertvh Member Posts: 516
Hi All,
I'm getting the message that the line already exist when setting a range on a customized table and doing a DELETEALL.
Working with NAV 2016 Ver 9.00 Build 42815
Below is the code and message

MediaBudgetLine.RESET;
MediaBudgetLine.SETRANGE("Budget No.","Budget No.");
MediaBudgetLine.SETRANGE("Line No.",LineNo);
MediaBudgetLine.SETRANGE("Budget Code","Budget Code");
MediaBudgetLine.SETRANGE("Group Customer No.","Group Customer No.");
MediaBudgetLine.SETRANGE("Group Vendor No.","Group Vendor No.");
MediaBudgetLine.SETRANGE("Medium Type Code","Medium Type Code");
MediaBudgetLine.SETRANGE("Responsible User",Responsible);
MediaBudgetLine.DELETEALL;



Microsoft Dynamics NAV

The Media Budget Line already exists. Identification fields and values: Budget No.='BB00019',Line No.='40000'
OK

Any ideas?

Albert

Comments

  • AlbertvhAlbertvh Member Posts: 516
    edited 2019-02-25
    Hi All,

    My input file was wrong it had the incorrect Line No.
Sign In or Register to comment.