error while C/AL coding

hi,

i have got a problem while creating a new form in which an error occurs which is attached to this post. would be helpful to have some help…!!! this error occurs when the form is compiled…

Regards,

Suman

I cant see the second parameter in function LookupName…may be you are passing 50000 table record…it should be 81 table…

Hi Mohana,

I have attached another screenshot. please have a look at it.

Regards,

suman

Thants great…but what is the SourceTable of the Form?

In the function your are actually passing 50000 table but function required table 81 i.e. Gen Journal Table

Look at the function of Genjnlmanagment codeunit and search lookup function .You can see that.

The function GenJnlManagement.LookupName can only be called with Table 81 (Gen. Journal Line). Your form has a SourceTable 5000. You cannot pass this table to call this function.

Chn

Thanks to all for the response. Yes i went to the Genjnlmanagement codeunit and saw that this codeunit is for the General journal line. the main problem is i want to make similar type of table to work on the recurring journal so i have created a new table and a new form for my company. I am not allowed to customize the built in table of NAV so i had to create new table and forms. can i modify the codeunit so that this record variable can work on the new table that i have created i.e 50000.

thanks and Regards,

Suman

You can create new function like LookupName function and modify the parameter in it to new table 50000…and call the function from new form…

can you please elaborate the solution with some screenshots mohana ji. i have created the function but couldnot access it.

thanks,

Suman

Can I come to your place and do it for you ji?

Tell us what did you do?and what is not working?

Read some technical manuals for creating functions and write a function just like Lookupname.