I’ve created a custom form, looking at the Vendor table. When people use this form, I want them to be take into a custom list view also. So far I have a menuitem with a name of List, shortcut key of F5.
If I say ‘Lookuptable’ as the action, it runs the default Vendor List, however I want it to use a custom form I have built. If I say ‘Run Object’ and use my form as the parameter, then the menu item works, as does F5, however the list view button in the toolbar still defaults to the original. I still want the original Vendor Card to use the default Vendor List.
This is because the default lookup form on the Vendor Table is set to the Vendor List. You can change that by going to the properties of the table.
But the issue is I don’t want to replace the default, I want to be able to over-ride it for this form onle - i.e. the existing Vendor Card should still load the Vendor List but this new for should load the new form. I’m presuming its not possible.
Not sure about your problem but it doesn’t seem complicated, without changing the default but using your customized form sometimes… did you try?:
if Form.runmodal(form::“yourCustomizedForm”) = Action::Lookuptable then begin
//your code to execute operations with the record selected
You just have to put the code on the OnLookup trigger, hope it helps !! [:)]
That doens’t work for the lookup arrow on the taskbar.
Here are a couple of ideas. You can put could in the onopenform trigger that opens your new form and closes itself. There would have to be some variable that you set just before calling it so it would interfere with standard functionality.
Another idea is to simply remove the default, disabling the arrow button all together.
Finally, you could create a new table, a copy of the vendor table, with a different default. When your custom form is called, you populate it with records.
Thanks to all for your suggestions. I’m going to have a play in our dev environment, see what I can come up with.