Monday 31 December 2018

Job to create default dimension having dimension attribute and value in D365FO

In this blog I will discuss how we create the default dimension having dimension attribute and dimension attribute values.

Please see below screenshot with source code explanation.

Explanation of source code (1.1):
  • In this section of Job Main method I have called the createDefaultDimension Method.
  • In this method I have passed three dimension attribute values.






Explanation of source code (1.2):
  • createDefaultDimension Method with three argurments.
  • Initialization and declaration of classes and data types.
  • Pass argument having dimension values and store into container.
  • After container is filled with dimension attributes and its values, iterate it.














Explanation of source code (1.3):
  • Iteration of dimension attributes.
  • Check dimension attribute exists or not.
  • Get the dimension attribute value.
  • Add the values of dimension in value Set Storage class by using add Item method.













Result:

Run the class (Job).












That is all you need to do to create default dimension record Id.

No comments:

Post a Comment

Key Updates in Dynamics 365 F&O for Version 10.0.39

Here’s a concise summary of the  platform updates  in  Microsoft Dynamics 365 Finance & Operations version 10.0.39 (March 2024) : 1- Add...