Dynamics AX In-Market Engineering

Dynamics AX In-Market Engineering (Sustained Engineering)

Fill Utility incorrectly updating a field in a form datasource

Fill Utility incorrectly updating a field in a form datasource

  • Comments 1
  • Likes

When using the fill utility in a form to change a field that is not the main data source of the form data in the main data source is updated. 

 

Scenario:

A user wishes to update the cost price for an inventory item.  Using the fill utility they select the appropriate field to update and follow the steps to use the fill utility.  After completing the process the user finds that the cost price information did not change but the Item type for the item was updated. 

 

The fill utility uses a field list to determine the field to update.  In the case of secondary data sources the fill utility is not able to decipher the difference in the table being updated.  In the case here, the cost price is field 3 in the InventTableModule.  When the update takes place the 3rd field in the InventTable, Item Type, is being updated. 

 

To implement code to block the fill utility from updating InventTable the following change can be made:

 

\Forms\SysRecordInfo\fillUtilityinit

 

               ...

                if (fieldIdLocal == dictTableLocal.primaryKeyField() ||

             fieldIdLocal == dictTableLocal.fieldName2Id('RECID') ||

             fieldIdLocal == dictTableLocal.fieldName2Id('DATAAREAID') || //add Or condition

             tblId == tablenum(InventTableModule)) //add condition for InventTableModuleTable

 

                    {

                        fillGrp.visible(false);

                        return;

                    }

Comments
  • Thanks for the information. How do you enable the Fill Utility on other forms? I can only see it on the Customer Master.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment