Having button that runs code, but doesn't submit data to (or validates against) table
I'm trying to add a button to an existing form (BankAccountTable). I want to add a button to run an outside process with the value of one of the form fields as a parameter. The value is being read using this code: str value = element.design().controlName("FieldName").valueStr(); However when I click the button Dynamics displays what fields must be filled in. This doesn't happen if the click method doesn't reference the form fields (i.e. info("click");). How can I: Read the value of a field without triggering form validation? and/or Have a button (or command buttton) that doesn't trigger form validation?
The second question, how to avoid validation, is easy: set the button attribute SaveRecord to No. You should rarely need to access the control value directly. A better option is usually to access the bound field directly: table.FieldName. If the control is not bound to a field, then change the AutoDeclation attribute to Yes and access the control directly: fieldName.text(). The methods text, realValue or selection is a better choice than valueStr.
Determine if a job is running in X++ code
Dynamics AX 2012 parsing Int32 to table field integer
Cancel Sales order packing slip through x++
Transferring open account records between customers
How to make sure that a form is only opened once?
Extend system menu in Dynamics AX 2012?
How to show selected items of certain table on the different table in Dynamics AX 2012?
AllowEdit doesn't work properly in Dynamics AX
AX 2012 how to set args record datasource in X++
Clients seem to be running old (buggy) code after XPO project import
Number sequence AX 2012
SSRS MS words report with page break
How can you get a detailed error descriptions in Dynamics AX?
How to get the length of an array?
X++ loop through lines in grid control
Concatenating row values in x++