To set a default value of a table field just use the initValue() method of the table [ExtensionOf(tableStr(CustTable))] final class CustTable_Table_Extension { void initValue() { next initValue(); this.yourField = 1234 //set your new custom field's default value. }
Category: Tables
AX / D365FO – How to get TABLE ID in Dynamics 365 for finance and operations
Table Id can be found SysTableIdView. in Dev environments, you can do direct query on sql server. select * from SysTableIdView
AX / D365FO – Add CreatedOn, CreatedBy, ModifiedOn, ModifiedBy fields on a Table
Do you want to know when a table record has been created or modified? Or better know who has created it or modified it? You can do it by enabling these properties on a Table object : Created By = Yes Created date Time = Yes Modified By = Yes Modified Date Time = Yes … Continue reading AX / D365FO – Add CreatedOn, CreatedBy, ModifiedOn, ModifiedBy fields on a Table
AX – D365FO – Making a Cross-Company Tables in AX
When using AX, there are a lot of times where you want data to go across companies. To set a Table to Cross company just set NO the "Save Data per Company" property
AX – D365FO – Update a field value of a table with the value of a joined table in update_recordset
This example shows that the update_recordset statement supports the joining of several tables. Data from the joined tables can be used to assign values to fields in the table that is being updated. static void Join22aJob(Args _args) { TableEmployee tabEmpl; TableDepartment tabDept; TableProject tabProj; ; update_recordset tabEmpl setting currentStatusDescription = tabDept.DeptName + ", " + … Continue reading AX – D365FO – Update a field value of a table with the value of a joined table in update_recordset
AX – D365FO – Add an hyperlink to a Form field to open the master data FOrm of that field
I have a form that contains a field called "IFRS code". I want to add an hyperlink to this field to open a form that contains the master table for that field when clicking on it (like below) If you do nothing you get this error while clicking on the field To solve the problem … Continue reading AX – D365FO – Add an hyperlink to a Form field to open the master data FOrm of that field
Ax – D365FO – List of tables id and Names in ax 2012
Here you can find the entire list of AX tables Id and Names : http://microsoft-dynamics-ax-erp.blogspot.com/2012/04/name-and-id-of-tables_13.html
AX – D365FO – Add a field in a lookup with AutoLookup field Group
I have a lookup in "Released product" form that is linked to a custom table. When I open the lookup I see only one field (Id code), but cannot see the description The description is a field of the custom table so I must add to the lookup to see it. How to to do … Continue reading AX – D365FO – Add a field in a lookup with AutoLookup field Group
AX – D365FO – Avoids deleting a record if it has records related to other tables (with table Relations functionality)
If you want to avoid deleting record on a table that has child record related to other table just follow this instructions. You must create a relation between Table "Al0VendorActivity" and "Al0VendorSearcCriteria". We want to avoid delete record from "Al0VendorActivity" if at least one record exists in the table "Al0VendorSearcCriteria". Create a relation between the … Continue reading AX – D365FO – Avoids deleting a record if it has records related to other tables (with table Relations functionality)
AX – D365FO – Avoid saving record in a table
Imagine you want to avoid saving a record of a table if a particular condition is met. You must access table and use ValidateWrite method Only one record can have this checkbox set to TRUE. If the use tries to set as TRUE another record the record cannot be saved. We will use the ValidateWrite … Continue reading AX – D365FO – Avoid saving record in a table