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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Not able to receive value in primary key

(0) ShareShare
ReportReport
Posted on by 72

As per the screen i have 3 field in primary key and i want to retrieve the field value in primary key .Below code i have written to get the values in primary key where Bankaccreconcileheader is record type of Bank Acc. Reconciliation table.when i am executing my code i am not to get values from the Bank Acc. Reconciliation table.

can anyone suggest for the same.through i have use get function but i got an error 'The type navoption is unknown'.

pastedimage1581073913855v1.png

Bankaccreconcileheader.RESET;
Bankaccreconcileheader.VALIDATE("Bank Account No.",bankacc."No.");
Bankaccreconcileheader.SETRANGE("Bank Account No.",Bankaccreconcileheader."Bank Account No.");
Bankaccreconcileheader.SETRANGE("Statement No.",Bankaccreconcileheader."Statement No.");
IF Bankaccreconcileheader.FINDFIRST THEN BEGIN REPEAT
BankaccReconciline.INIT;
//BankaccReconciline.VALIDATE("Bank Account No.",bankacc."Bank Account No.");
//BankaccReconciline.VALIDATE("Bank Account No.",Bankaccreconcileheader."Bank Account No.");
BankaccReconciline."Bank Account No.":=Bankaccreconcileheader."Bank Account No.";
BankaccReconciline."Statement No.":=Bankaccreconcileheader."Statement No.";
BankaccReconciline."Statement Line No."+=10000;
//EVALUATE(BankaccReconciline."Statement Line No.",GetvalueAtCell(RowNo,1));
EVALUATE(BankaccReconciline."Transaction Date",GetvalueAtCell(RowNo,2));
EVALUATE(BankaccReconciline.Description,GetvalueAtCell(RowNo,3));
EVALUATE(BankaccReconciline."Check No.",GetvalueAtCell(RowNo,5));
EVALUATE(BankaccReconciline."Statement Amount",GetvalueAtCell(RowNo,6));
EVALUATE(BankaccReconciline."Applied Amount",GetvalueAtCell(RowNo,7));
EVALUATE(BankaccReconciline."Value Date",GetvalueAtCell(RowNo,9));

BankaccReconciline.INSERT(TRUE);
UNTIL Bankaccreconcileheader.NEXT=0;
END;

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,269 Super User 2026 Season 1 on at

    You get that error when you don't filter the option field.  You need to apply the SETRANGE not validate

    Bankaccreconcileheader.VALIDATE("Bank Account No.",bankacc."No.");

    and to SETRANGE you are using the same table to filter, you need to replace the below with bank account no. you want to filter

    Bankaccreconcileheader.SETRANGE("Bank Account No.",Bankaccreconcileheader."Bank Account No.");

    to

    Bankaccreconcileheader.SETRANGE("Bank Account No.",BankAcc."No."); and statement from BankAcc table

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,958 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,101 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans