Simulate the event Click on Ok button on a Modal Form

Hello
i have a problem with a modal form. I wont to open a custom “item variant list” on-open form trigger standard Form.
I have to do this because we want to work always on the custom form, and we wont to modify the standard form when Microsoft release one new version of Nav.
In a Card Form on the Open Form trigger we run the custom form and when the user close the curtom form C/side code return to On Open trigger of the standard Form and with CurrReport.CLOSE we close the standard form.

When we use a custom list form to select a record or a record field i must simulate the OK event click on the standard form if on custom modal form the user press OK.

If we have an idea to simulate the event click on ok button on a modal form…

You’re thinking way too complex about this.

You can set your custom form as the standard Lookup form for the table, and then you can just simply select the record from your custom form. No need t simulate anything. If you need to have a specific form in specific situations, you will need to program what should happen in the OnLookup trigger of the field that has the relation into the table. That way you have complete control over which form to use, and what to do with the selected records.

Daniel is 100% correct. Don’t fight Navision, work with it.