How to fetch Id from recordId type datatype

Hii All,

Actually i am developing a report for Employee records where i have to show attachment for each employee.I attached the document via Links .The main problem is now the all information stored in Record Link table where the RecordID contains the Table Name+:+Record Id.Suppose i want to show all attachment related to Employee_Id :124 so how can i fetch only Employee id only to Filter the records related to this employee.The RecordID in Record link contains Employee:124**.I tried this which retuns me table id:**

RecordLink.RESET; IF RecordLink.FIND(’-’) THEN REPEAT RecId := RecordLink.“Record ID”; RecRef := RecId.GETRECORD; RecordPOS := RecRef.GETPOSITION(FALSE); TableId := RecRef.NUMBER; UNTIL RecordLink.NEXT = 0;

Please suggest me …Thanks in advance.

Regards,

Akhil

In Record link table record id contains the table name and field name .

Example

Employee:124

Here Employee is table and 124 is your employee id