Triggering Forms

Hi, I have a question. Is there a way to trigger in a Table-Variable what form is being used (i.e. table 37 (Salesheader) is using Form 42 (SalesOrder))? I want to do a modification on a copy of a SalesOrder Form and in this form some table-field triggers should be handled a bit different then the standard table-field triggers. So I would like to know if I can trigger which form I fire? I tried to solve my problem to create a function in the table and to set a boolean. When I fire Form A I set this boolean to true otherwise this boolean is false. In the table code I can trigger this boolean and according to if the boolean is true or false I can handle my table-field triggers in a different way. But for some reason it doesnt work. Any help is welcome. Roelof.

The easiest way to find out, where a table, Form, object, Field, Variable or whatever is used is to export all Objects as Text-file and do a simple text-search in this file. In your case you would export all Forms and search for “SourceTable=Table37;” Determining which form is currently accessing the table is not possible for the following reasons: 1) the table is not using the form; the form is using the table 2) Not only forms can access a table. Also dataports, reports, codeunits and other tables. Your trick with the boolean field is not elegant but it should work providing that you don’t forget to issue a modify on the record after setting the boolean! “not elegant” means that there might be better possibilities to determine which form is using the table respectively which action has to be taken. To come back to the example you mention: T37 is used by the forms 42 (orders) and 43 (invoices). But you don’t need a boolean flag to determine which of the two forms is running: you can simply check the DocumentType to determine which action is required. I even would go one step further and say: The functionality and behaviour of a field does not depend on the form you use the table with but only from the contents of the record itselves. Marcus Marcus Fabian phone: +41 79 4397872