web
You’re offline. This is a read only version of the page.
close
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...
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,241 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,316

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,449 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,431 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans