Updating version number on model

It is easy to update the version number (and other properties) on a model:

Using AxUtil:

axutil edit /model:<MyModelName> /manifest:Version=1.2.5.0

Using PowerShell:

Edit-AXModelManifest -Model <MyModelName> -ManifestProperty "Version = 1.2.5.0"
Advertisements

Adding tables to forms based on queries (List pages)

Form based on a query in the datasource cannot show new tables added to the query. All though the added datasource is visible in the query on the form it is not included in the list of available datasources from which you can drag’n’drop fields into the grid.

To make that happen you need to do a little massaging of the form outside AX.

Export the form and edit the export file in Notepad. Locate the definition of the datasources and add the following text (remember to change the name and table to whatever fits your current situation).

The text should be inserted immediately after the other data source objects and before the derived data source objects:

   DATASOURCE

      OBJECTPOOL
        PROPERTIES
          Name                #<DatasourceName>
          Table               #<TableName>
          AllowEdit           #No

          AllowCreate         #No
          AllowDelete         #No
          OnlyFetchActive     #Yes

        ENDPROPERTIES

        FIELDLIST

        ENDFIELDLIST

      ENDOBJECTPOOL

      METHODS

      ENDMETHODS

      LINKTYPES

        DATASOURCE

          PROPERTIES

            Name                #<DataSourcename>

            ParentDataSource    #<ParentDatasourceName>

          ENDPROPERTIES

      ENDLINKTYPES

    ENDDATASOURCE
Save the file and import it into AX.
It is not pretty but it works. 🙂