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.


Run the class (Job).

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

No comments:

Post a Comment

Set up Online VM for Dynamics 365 Finance and Operation for Technical and Functional Learning Purposes

In this blog, I will discuss how we set up an online VM for D365F&O for Technical and Functional learning purposes for free. Step: 1 Cl...