I think this is one of the best articles which is very useful for beginners to understand the basic concept of customization in dynamics 365 FO. Here I am showing you how to add a field in a table and add this field into a form data source and form.
From a beginner's perspective, adding a field to a table and reflecting on this newly created field at a form level will be good for their practices.
So let us start the topic, for easy understanding, I am taking the customer table CustTable and Customer Form CustTable, adding one remark filed in the Customer table, and adding this newly created table field into the form data source and form itself.
In the previous articles, I showed How to add a new field to an existing table in dynamics 365 finance and operations. This article is the continuation of that article, so if you did not read that article you must read that article first.if you read the previous article, then the table-level customization is completed.
So next step is form-level customization, for this
Extend Form CustTable
- Under User Interface, Expand Forms.
- Under User Interface, Expand Forms.
- Right Click On CustTable and click Create Extension.
- After a few seconds one Folder name FormExtensions and a table named CustTable.Extension2 is created under the Project CustomerModification in Solution Explorer Window.
- Double click on CustTable.Extension2.
- Another designer window opens for CustTable.Extension2.
- Expand Tab-->TabPageDetails-->TabHeader.
- Add new FormTabControl and change the Name property from the property window to "FormTabControl 1", also change the caption property to "Remarks".
- Then add a new Field group by right-clicking FormTabControl1-->New-->Group.
- Update the label property to "Remarks".
- Set the Data Source Property to CustTable
- And select the Data Field Property to CustRemarks.
- Set MultiLine Property to Yes.
- Build the project again for reflecting the changes. Now the Customization Process is completed. Let us see the output of the customization.
Now you can see the newly added table field CustRemarks is added into the form data source. and we added this Custremarks field to the user interface, then only you can add and retrieve data to and from the field. So we can check the customization at the form level.
Open D365 Functional Environment
Expand Remarks Group.
Now you can see one new remarks text area has been created in the form. you can add new customer remarks values and you can retrieve already created customer remarks values into this remark text field.