Showing posts with label Form. Show all posts
Showing posts with label Form. Show all posts

Monday, March 11, 2024

D365 - Filter RefRecId Grid column for NULL Value

A client wanted to filter a column for blank values, and it wasn't working.  I tried all sort of query syntax tricks with no avail.  Is Exactly "", Is Not ?*, Is Exactly 0, Does Not Contain *, etc... The issue was that the field was a refRecId with a lookup against a related table. Here is what worked:

Use the 'Matches' option with the following value: (InventTable.FieldNameRefRecId == 0)

Include the parenthesis and change the field name to the field you are filtering on.

Thursday, July 18, 2019

Making a Dialog Form Stay on Top

I am working on a project that requires me to lock a parent form when a dialog is executed from a 'submit' button click on the parent form.  If the parent form is not locked, the user could continually push the button and execute multiple dialog boxes, which would not be good.  While exploring the Dialog class I found an easy solution, the IsModal variable. Simply set the isModal variable using the parmIsModal() method before calling Dialog.Run().  Like this.



Now, the user must close the Dialog before they can use any other AX form. Perfect!