form with fields from different tables

Hi, I try to link the customer form with Job ledger entry table. However, the only link is through the job table. It means I needs to find the customer in the job table first. Then I need to show all job ledger entry transactions regarding to that customer. I can’t create the link directly from customer to job ledger entry table since no customer no. in the job ledger entry table. My objective is calling the job ledger entry transactions form from customer form. Hope I had explained my question. Is anyway to solve this problem? thank you

Hi, one of the solutions is to make the link in two stages: First: Customer → List of jobs for this customer Second: From The linked job line → show all job entries for the active Job. This would require minimum programming. From Customer card call Form 89 “Job list” filtered for the Customer No. (Bill-to Customer No is already a secondary key) Then from Job list by pressing Ctrl-F5 get the Job entries. Advantage of this solution is minimum programming required. Disadvantage is, that you will not see all Job ledger entries at once. Michal

There are three possible solutions which come to mind: (1) Add a lookup FlowField for Bill-to Customer No. to the Job Ledger Entry table. Then you can call the Job Ledger Entries form directly from the Customer Card. Since you have a flowfield, there is not as much database space taken up as if you put the Bill-to Customer No directly on the table. The disadvantage is that you can’t sort the Job Ledger table by the Bill-to Customer and thus bring up the form could take time when there is a large amount of data. (2) Use the Marked functionality from the Customer Card. On the menu, you can use a function like: JobLedgEntry.RESET; JobLedgEntry.CLEARMARKS; Job.RESET; Job.SETCURRENTKEY(“Bill-to Customer No.”); Job.SETRANGE(“Bill-to Customer No.”,“No.”); IF Job.FIND (’-’) THEN REPEAT JobLedgEntry.SETRANGE(“Job No.”,Job.“No.”); IF JobLedgEntry.FIND(’-’) THEN REPEAT JobLedgEntry.MARK(TRUE); UNTIL JobLedgEntry.NEXT = 0; UNTIL Job.NEXT = 0; JobLedgEntry.SETRANGE(“Job No.”); JobLedgEntry.MARKEDONLY(TRUE); CLEAR(JobLedgEntries); JobLedgEntries.SETTABLEVIEW(JobLedgEntry); JobLedgEntries.RUN; The advantage over (1) is that there is no fields added, but it is more coding. (3) Add the Bill-to Customer No. to the Job Journal/Ledger Entry and change the posting routine to update this field. I don’t think I would go this route unless the other two don’t work, but it is an option, so I included it. Hopefully this helped. Chris Krantz NCSD,NCSQL,MCSD,MCSE Microforum Inc. Toronto, Ontario, Canada

Thank you for contributions. I think Chris’s method is more suitable in this situation.

Dont forget to JobLedgEntry.SETCURRENTKEY on “Job No.” with a key such as “Job No.,Posting Date”. Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu