Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

I'd like to solve the error: The type NavInteger is unknown.

(0) ShareShare
ReportReport
Posted on by 65

Hi, All.

 

I hava a issue which i'd like to solve.

See the picture below as examples for more info.

_B930AF30EA30FC30F330B730E730C330C830_-2021_2D00_01_2D00_18-143452.png

When doing an Excel import,  I get the error: The type NavInteger is unknown.

The point where the error occurs is where the Get method is called.

Here is the source code:

page 50001 "Sales Order Import Management"
{

    //
    
    //The error occurs here.
    if SalesOrderImportBuffer_R.Get(GetValueAtIndex(RowNo, 1), GetValueAtIndex(RowNo, 2)) then begin
                Evaluate(SalesOrderImportBuffer_R."Sell-to Customer No.", GetValueAtIndex(RowNo, 2));
                SalesOrderImportBuffer_R.Validate("Sell-to Customer No.");
                Evaluate(SalesOrderImportBuffer_R."Document No.", GetValueAtIndex(RowNo, 3));
                SalesOrderImportBuffer_R.Validate("Document No.");
                //
                
                
                SalesOrderImportBuffer_R.Modify(true);
            end
            
            
    
    //GetValueAtIndex Method
    local procedure GetValueAtIndex(RowNo: Integer; ColNo: Integer): Text
    var
    begin
        Rec_ExcelBuffer.Reset();
        if Rec_ExcelBuffer.Get(RowNo, ColNo) then
            exit(Rec_ExcelBuffer."Cell Value as Text");
    end;

Here is the the primary key:

keys
    {
        key(Key1; "Entry No.", "Sell-to Customer No.")
        {
        }

    }

I would appreciate it if I could get your advice. Thank you.

  • nagatak Profile Picture
    nagatak 65 on at
    RE: I'd like to solve the error: The type NavInteger is unknown.

    Thanks for the advice.

    I was able to resolve the error after reviewing the keys and compiling.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: I'd like to solve the error: The type NavInteger is unknown.

    One of the possible causes of this error is a wrong key parameters for the GET operation.

    It's not clear the key definition you're showing here to what table pertains, but it seems that it's composed of an integer field and a Code fields. Please check that you're passing an integer and a code in your GET operation (and not for example two integers or two strings).

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans