How to Color code data records using configurable colors for easy identification in Dynamics 365 For Finance & Operations
Have you ever come across requirements where business often wants easier ways of identifying data records in certain status with specific color coding of the records? For example you might want to see all Approved Sales or Purchase orders marked in “Green Color”, and all Rejected/In Review sales orders marked in Orange/Red color. This was just an example to name, but think of applying this to any real time business scenario !!
Our experts have handled these requirements for some of our customers in our recent projects and one of our team members shares his experience here in this post.
In D365 Finance and Operations, let’s assume there is scenario where in the form grid lines need color coding based on the value of a specific data field whose color code can be selected as a setup, Example – Status Codes.
WinApi is the main class that gets used to achieve this in Dynamics AX2012. But with the deprecation of most of this class methods especially related to color picker in D365 Finance and Operations, we may need to use a new class called ColorSelection.
Implement the below logic / steps to accomplish this in D365 Finance and Operations.
Table Field – CColor
Create a new integer field by extending the standard EDT CColor in any table where the color code needs to be stores as a setup.
Setup Form –
Add an Form integer control to populate a lookup and select the color through a color picker.
Set the control properties as –
- Auto Declaration – Yes
- Lookup Button – Always
- Show Zero – No
Create three methods as –
· Lookup – Overridden method on the form integer control.
· SetColor – New Edit method at data source level.
· Active – Overridden method at data source level.
Form Control & Properties
Form Control Lookup Method
Form Control Data Method (Edit Method)
Data Source Active Method
Transaction Form –
To apply color code on the transaction form grid records, add the below code by overriding the below method at data source level –
· DisplayOption – Overridden method on the form data source level.
That’s it for this post. Stay tuned for more !!
And, Of course, If you need assistance with this or with anything related to Dynamics 365 or Dynamics AX Services and support, feel free to contact [email protected]
How to create a custom table/data source for use in Ledger Financial dimensions in Dynamics 365 for Finance and Operations
One of our Dynamics 365 experts shares his experience and ideas on how to create a new custom data entity/form and then enable it for use as a Ledger Financial dimension. The financial dimensions framework of the standard Dynamics 365 For Finance and Operations app is pretty robust and allows you to configure as many financial dimensions as you require, using values from various out of the box entities such as Customers, vendors, employees, products, Prospects and more. However, there are often situations where you customize Dynamics 365 for Finance and Operations to add new custom data entities/tables to address specific needs of your business. In those cases, you may want to use these custom entities as one of the financial dimension, to be able to do appropriate financial reporting.
This post gives you the detailed insights about how to go about this.
Below is the list of AOT objects that are required to create a new custom financial dimension in D365 For Operations.
Table – KRDimTable
This is the table that I have created to be considered as master data that need to be used as one of the financial dimensions. This is as good as standard master tables like “CustGroup”. Minimum 2 fields are required.
Below is the screenshot of the Visual Studio representation of the table for your reference.
Form – KRDimTable
This is the form that I have created to open the “Custom dimension” form from the client and to key in the data to be used as dimension values. This is as good as other standard forms like “CustGroup”.
Below are the screenshots representing doth Visual Studio and Client representations for your reference.
Display Menu Item
General Ledger Menu Extension
View – DimAttributeKRDimTable
This view is most important object that enabled the “Custom dimension” as one of the financial dimensions.
- Data Source to be named as “BackingEntity”
- Singular label property to be set as appropriate.
- Three fields that are required are as below
- Indexes that are required are as below
- Subscription methods that is required is as below
Refer to the below screenshots for more details
Form – Financial Dimension
After completing the above development, below is the output that one should see the below shown screenshots as the result.
Open the Financial dimensions form.
Create new financial dimension and select the newly added dimension from “Use values from” lookup.
Save the record and activate the financial dimension.
Open the Configure account structures form.
Edit the required account structure and set CustomDimension as one of the dimension and activate it.
To validate the output, navigate to the customer master Financial dimensions tab page to see the newly added financial dimension.
To validate the output, navigate to any of the standard journal lines form to see the newly added financial dimension as a part of both default dimension and ledger dimension.
To validate the output, post any standard journal by setting the newly created financial dimension values and navigate to the voucher form to see the newly added financial dimension.
The concludes this post. Hope this post was helpful for you all.
If you need assistance with this or with anything related to Dynamics 365 or Dynamics AX Services and support, feel free to contact s[email protected]