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'.
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;
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,493 Most Valuable Professional
nmaenpaa 101,148