C\AL Type conversion trouble

InnerCodeInnerCode Member Posts: 8
Hi,

I'm getting stuck on the following problem.

I've the table "Service Order Cost Plus Entry" as Data Source. Then in the "Service Order Cost Plus Entry - OnAfterGetRecord" section are the following C\AL Locals declared:
lvServiceLedgerEntry = type: record, table "Service-Ledger Entry" (11012819)
lvEntryNo = type: integer

So I want to set a filter on lvServiceLedgerEntry."Entry No." = "Entry No. Service Ledger" with the following code:
lvServiceLedgerEntry.SETFILTER("Entry No.", "Entry No. Service Ledger");
That gives a type conversion error Text := Integer

So I've to convert lvServiceLedgerEntry."Entry No." into a integer.
The case is that EVALUATE(lvEntryNo, lvServiceLedgerEntry."Entry No.") doesn't work because it sees the column as integer and not as text.

How can I apply the filter? Thanks in advance.

Regards,
InnerCode

Best Answer

Answers

Sign In or Register to comment.