Introduction:
Ever felt a need to expose Dimensions on G/L Entries? Wouldn't it be simple to check-in G/L Entries or perform a Pivot in Excel directly?Well, that is exactly what I'm planning for.
Use Case: Add the 2 Global Dimension & 6 Shortcut Dimension to G/L Entries Table in Business Central. These fields should be downloadable in Edit in Excel.
Use Case: Add the 2 Global Dimension & 6 Shortcut Dimension to G/L Entries Table in Business Central. These fields should be downloadable in Edit in Excel.
Pre-requisites:
- Microsoft Dynamics 365 Business Central
- VS Code
- AL Language Extension
Procedure:
1. Adding fields to the Page:
I will be creating 8 variables on the G/L Entry Page of the Type Code[30] and add the variables as fields to the page.
Fields to G/L Entry Page |
2. Adding Logic to fetch data into the fields:
The fields that were recently created needs to be filled in with values for each and every record.
Dimension Set Entries table consist of Dimension Set ID (Integer) and Dimension Code which will be getting from General Ledger Setup.
Fetch the Dimension Value |
Output:
Dimension in G/L Entries |
Exporting to Excel:
Edit in Excel with Dimensions |
Conclusion:
I hope this helps you in generating some sort of reporting & analysis directly through G/L.
Possible use of this could be using this page through WebService to generate Data for PowerBI.
Possible use of this could be using this page through WebService to generate Data for PowerBI.
How does this handle a scenario where you are not using all 8 shortcut dimensions? Would it be considered worthwhile to have a Visibility variable set for each column and then use that to also set the data in the data variable?
ReplyDeleteDear Olister
ReplyDeleteThanks a lot for this great topic,
How to change the caption of these new fields instead of Dim1, Dim2 to get the caption in the General Ledger setup like Department, Project & etc.
Thanks a lot