Hi all, does anyone know if i can get form id from another form??
my problem is that on the OnOpenForm tirgger of the Item List there is a set of filters being activated, now i want to skip those if the user uses the lookup button on one specific form. i thought i can get around it if i know the objectid of which object is calling ItemList.
Or maybe someone can show me some light to another solution to this problem?
Thanks
0
Comments
I do this quite often, especially to set the form to non editable if the form is being used as a lookup (eg. forms like Country, Sales person etc.) Just add this code in the form
In that case yes, so instead of explaining HOW you want to do this, why don't you explain WHAT you want to do.
We've had clients with similar requests. What we did is to put the code on the OnLookup trigger of the form and set the filter beforehand.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I have a form, where you have to choose an item, the textfield is linked to the itemlist form. now the itemlist hase some code running on the openform trigger which i want to skip if the lookup is made from this specific form but ran if made from the rest of the objects.
yes but what is it you need to do? Why does the code run in one case and not in another? What is the business reason for this.
Couldn't you just manuall write the OnLookup code of the control, and pass information to a function on the new form?
E.G.
(Just making this up)
Definite ItemList
and on the 2nd form create a function that either takes that ObjectID, or just has a global variable
Then OnOpenForm around your filters..
"Profanity is the one language all programmers know best."