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

How to Get Customer Free Text Invoice "Totals" form field value with X++ in D365FO

Customer free text invoices are an essential aspect of financial management in D365FO. In this blog, I have compiled all the code needed to ...