Vous êtes sur la page 1sur 32

Chapter 5: Use and Design of the Product Information Management Module

CHAPTER 5: USE AND DESIGN OF THE PRODUCT INFORMATION MANAGEMENT MODULE


Objectives
The objectives are: Describe how products are set up, released, and finalized. Describe how inventory dimensions and groups are used to manage product information. Review the data model for inventory dimensions.

Introduction
A product is an item, service, or right that results from an economic activity. In Microsoft Dynamics AX 2012, all product data is shared across all companies, and the virtual table collection concept is no longer available for product data . The item representation (InventTable) used in earlier versions still exists, and this table can still be included in a table collection. However, it now has a foreign key to the shared product instance (EcoResProduct hierarchy), and it represents the released product concept or a given enterprise product that is now authorized for use inside a legal entity. This chapter highlights the new patterns used to represent item-product master data. This document does not describe all new functionality within the itemproduct data management feature. Instead, this document focuses on the development patterns and how they are implemented. A complete list of new tables and their replacements can be found in the Implementing the Item-Product Data Management Framework for Microsoft Dynamics AX 2012 white paper at https://go.microsoft.com/fwlink/?LinkId=246121.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-1

Development IV in Microsoft Dynamics AX 2012

Products
Product information management in Microsoft Dynamics AX 2012 targets the creation and maintenance of an Enterprise Products Repository. It supports larger organizations in a centralized structured approach in creating and maintaining core master data such as product definitions. Smaller organizations that require a more decentralized approach can, with some restrictions, create and maintain their products while they are automatically added to the shared products repository.

Product Maintenance
Product definitions are created independently of a legal entity, and core values such as product number, type, and name are shared values. Some core values can be overridden by a legal entity, an example is the search name. Other values are kept as key definition attributes and they cannot be changed other than on the actual product definition. From a decentralized process, you can create and maintain products directly from the Released products list page in the Product information management module. A product definition is created by the system when a product is created directly from the Released products list page.

Product Types and Subtypes


Two core types of products can be defined manually in Microsoft Dynamics AX 2012. Products o These are clearly identifiable products that do not have variations associated with them. You can think of them as standard or base products. Use the Products list page in the Product information management module to view and manage products.

Product masters o These serve as templates or models for variants. The variants of a product master can be predefined or created in sales scenarios by using a product configurator. A product master is associated with one or more product dimensions or for some configurations or product attributes. Use the Product masters list page in the Product Information Management module to view and manage product masters.

5-2

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


To view all products and product masters use the All products and product masters list page by using the following path: Product information management > Common > Products > All products and product masters

FIGURE 5.1 ALL PRODUCTS LIST PAGE

As in Microsoft Dynamics AX 2009, the product type classifies if a product is tangible or intangible (an item or a service). In Microsoft Dynamics AX 2012, this difference is made as a sub classification of the product. There are three subtypes of productsproduct master, distinct product, and product variant. Product variants will be variants of product masters. This concept is designed as a super-type/subtype table hierarchy to decouple specific properties between different entities that are of the same nature. A product master is associated to the EcoResProductDimensionGroup and can have a range of predefined product dimensions available. For example, a t-shirt could be a product master with various sizes (small, medium, large) and colors (blue, green). The product variant represents variations of the product master. By contrast, a distinct product cannot have variations (meaning it cannot have any product dimensions specified).

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-3

Development IV in Microsoft Dynamics AX 2012


Product Creation Process
To create a new product, follow this four-step process: 1. 2. 3. 4. Create and define the product. Release the product to legal entities. Define legal entity specific data. Use the product.

When you create a new product definition the type and subtype are the key attributes to enterthey determine the additional functions and required setup. The product type classifies if a product is tangible or intangible (item or service), whereas the sub-type introduced in Microsoft Dynamics AX 2012 is a subclassification of the product. The following figure lists all shared product definition attributes.

FIGURE 5.2 SHARED PRODUCT DEFINITION ATTRIBUTES

5-4

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


Product Patterns
This pattern applies to the following tables. EcoResProduct EcoResProductMaster EcoResDistinctProductVariant EcoResDistinctProduct

All products are stored as system master data, and are used by organizations to create and maintain shared product definition data. The "product master" concept includes the product definition, and can have variants in product dimensions (color, size, and configuration). The "product variant" concept includes a product that has several of the associated product dimension values (color, size, and configuration). It replaces the previous "item combination" concept. Be aware that a product variant has all the attributes and functionality of any other type of product. The "distinct product" concept includes a product that does not vary in product dimensions and therefore cannot have a product dimension group associated to it. The products in a system can be released to a legal entity to become available for various processes (sales, purchase, and production). The same shared product variants can be available for production in one company, but not available for the production in another legal entity.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-5

Development IV in Microsoft Dynamics AX 2012


Product dimension values such as colors, sizes, and configuration are stored in the system tables (EcoResColor, EcoResConfiguration, and EcoResSize) and are immutable. The InventDim product dimensions values point to the EcoResColor.Name, EcoResConfiguration.Name, and EcoResSize.Name fields.

FIGURE 5.3 PRODUCT DATA MODEL

Releasing Products
The product release process is designed to enable users in an enterprise to move or copy product definitions to various organizational units. By releasing a product or a product master you associate it with a legal entity and authorize the product definition for use in the legal entity.

5-6

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


Before you can use a product master on a transaction, such as a sales order or purchase order, both the product master and one or more of its variants must be released to each legal entity, if the configuration technology is set to be predefined variants. When products are released, many combinations of products, product masters, product variants, and legal entities can be released such as the following: Single products or multiple products. Single product variants or multiple product variants. Single legal entity or multiple legal entities.

You can release products from the following locations. Product information management > Common > Product > All products and product masters list page, and then click Release products. Product information management > Common > Product > Product master list page, and then click Release products. Product information management > Common > Product > Product list page, and then click Release products.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-7

Development IV in Microsoft Dynamics AX 2012


From the Product details form click Release products. The Product details form is opened by double-clicking a product in any of the Product information management list pages.

FIGURE 5.4 RELEASE PRODUCTS FORM

Finalizing Product Set Up


After you release a product to a legal entity, you must finalize it before the product can be on a transaction, such as a sales order or purchase order. You must finalize a product in each legal entity where you have released it. In Microsoft Dynamics AX there are four fields that must be set up on the Released product form (open Product information management > Common > Released products) before you can use the product on a transaction. You can manually enter, or use a template to enter the following fields. Item model group Item group Storage dimension group (only if it is not specified on the product definition) Tracking dimension group (only if it is not specified on the product definition)

To make sure these four mentioned fields are set up, you can run a validation check on the product in the respective legal entity. When you click Validate in the Maintain group of the Action Pane, the system will check for the attributes and produce a warning if no value exists.

5-8

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


Additional Item Setup
When you have finished creating a product there are many additional details that can be completed for each product. Warehouse items: Warehouse items are used to define information about items and the related warehouse and counting settings. The settings can be made specific based on the items configuration and vary from warehouse to warehouse. Warehouse items are stored in the InventItemLocation table. Default order and Site specific order settings: The default and site specific order settings are used by master planning to generate sales orders, purchase orders, and inventory orders. The settings are stored in the InvetItemPurchSetup, InvnetItemSalesSetup, and InvetItemInventSetup tables. The InventItemSetupSupplyType table is used to store the default order type. The main settings involve the following areas: o o o Defining a warehouse to use for each module when orders are created. Defining the settings that modify order quantities for each module when orders are created. Defining the type of planned order to be created when master planning is run.

Product images: Each item can have multiple images linked to it. The images are stored in the document handling system by using the DocuRef table. Barcodes: You can define barcodes for each item. The InventItemBarcode table contains information about the bar codes that are used for items. GTIN: You can define Global Trade Item Numbers (GTIN) for each item. GTIN is a 14-digit data structure used to uniquely identify trade products. The InventItemGTIN table contains information about items and their related GTINs.

Additional Functionality
The following sections describe additional functionality that is available to help further classify and define the product information.

Category Hierarchies and Categories


You can use category hierarchies to classify products for reporting and analysis purposes. Each category hierarchy consists of a structure of subcategories. An organization can create more than one category hierarchy. For example, your organization might create one category hierarchy for classifying purchased products and another hierarchy for classifying vendors.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-9

Development IV in Microsoft Dynamics AX 2012


Product Attributes
You can use product attributes to identify the details that you want to maintain for your products such as, Stock Keeping Unit (SKU) number, product version, and so on. Product attributes also provide additional details that your organization might want to record for a particular product or category. You can associate product attributes together with a product through the category that the product belongs to. When you add a category and its associated products to your procurement catalog, the attributes assigned to the procurement category are imported into the catalog and can display on the procurement site. When you define product attributes, you must first define the attribute type and then assign the attribute type to the attribute. The attribute type identifies the type of data that can be entered for a specific attribute and a list or range of valid values that can be used for the attribute. The attribute is the value that is displayed with the product to provide the requester additional details about the product.

Product Translation
When you use the Text translation form, you can create product translations by entering descriptions and product names for multiple languages. However, the product name and description are optional, only the product number is required. The product translations are mainly used for output on external documents, and the data values will always be shown in the system language, for example, when you open and view the product related list pages and forms. On external documents the product name will be displayed according to the company language or the preferred language by the customer or vendor. To open the Text translation form click the Translations button in the Action Pane of All products and product masters forms or list pages.

Product Translations Pattern


This pattern applies to the EcoResProductTranslation table. In Microsoft Dynamics AX 2012, users can define multilanguage translations for shared product definitions. Out-of-the box, the product localization attributes are the product name and the product description. The Product search name is used to control shared and legal-entityspecific values to the product "alias" functionality. By default, the product has its name and translation in the system language (enterprise organizational language).

5-10

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


The pattern that is applied to model product localization is consistent across the application to model localization support for shared entities. The general system translation forms are used to manage product translation. This enables a consistent user experience in the way that the user interacts with the various entities in the system for multilanguage translation (product, attributes, catalog descriptions, and so on).

FIGURE 5.5 PRODUCT TRANSLATIONS DATA MODEL

Product and Item Identification Pattern


This pattern applies to the following: ProductNumber ItemId EcoResProductIdentification EcoResProduct.DisplayProductName InventTable.ItemId

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-11

Development IV in Microsoft Dynamics AX 2012


In Microsoft Dynamics AX 2012, a product is identified by a unique shared product number value, which is a natural key of the product entity. Not all types of products can have a unique product number. The product variants do not have their own shared product number because they are always identified by the relation to their product master. The DisplayProductNumber attribute helps identify product variants quickly and uniquely in the application user interface. Internally, all products have their own system-unique surrogate key that should always be used to model the relationship to the product.

5-12

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


The InventTable still has an ItemId value that by default will be equal to the corresponding product shared number value. However, in certain cases, you can have an itemId value that differs from its product number value. With this option you can have different identification strategies for the same product instance in different legal entities.

FIGURE 5.6 PRODUCT AND ITEM IDENTIFICATION DATA MODEL

Inventory Dimensions
There is a clear difference between product attributes and product dimensions. You can use product dimensions to track their values in all major processes such as for cost, inventory, and analysis purposes. Product attributes are only associated with products and product masters, and product dimensions can only be used together with product masters (except for masters that are configured by using the option constraint-based configuration). This is because they consist of the uniqueness of a product masters variations.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-13

Development IV in Microsoft Dynamics AX 2012


You can determine which product dimensions are mandatory for a given product master by selecting the appropriate product dimension group when you create the product master. The product dimension group is set up from Product information management > Setup > Dimension groups > Product dimension groups. Microsoft Dynamics AX 2012 offers three product dimensions that include size, color, and configuration.

Inventory Dimension Groups


In Microsoft Dynamics AX 2012 inventory dimensions are divided into the following three categories: Product dimensions. These correspond to the size, color, and configuration. Storage dimensions. These are site, warehouse, location, and pallet. Tracking dimensions. These are batch number and serial number.

The product dimension group can be assigned only when the product is being created. The storage and tracking dimensions groups can be assigned to the product on two levelssystem level, where they are used in all legal entities where the product is released, and the legal-entity level, where they are used only for the product that is in that specific legal entity.

5-14

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


The following diagram shows the physical data model.

FIGURE 5.7 DIMENSION GROUPS DATA MODEL

The InventDimSearch class used in Microsoft Dynamics AX 2009 is no longer available. In Microsoft Dynamics AX 2012, this class is replaced with several new classes that are used to retrieve information about the inventory dimension setup. To determine if a dimension for a specific field is active you can use the following code sample.
InventTable inventTable; InventDimGroupSetup inventDimGroupSetup; InventDimGroupFieldSetup inventDimGroupFieldSetup; inventDimGroupSetup = InventDimGroupSetup::newInventTable(inventTable); inventDimGroupFieldSetup = inventDimGroupSetup.getFieldSetup(fieldNum(InventDim,WMSPal letId)); if (inventDimGroupFieldSetup.isActive()) { info(strFmt("The palletId dimension is active for dimension group %1",inventDimGroupSetup.getStorageDimensionGroup())); }

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-15

Development IV in Microsoft Dynamics AX 2012


Configuration Technologies
You can use the product setup to model configurable products. When you work with product masters it is important to define how the variations of a master are created. Frequently, many mandatory attributes must be specified to create a new variation. How a variant is constructed is controlled by the configuration technology that is set up on the product master. Configuration technology Predefined variant Definition With this type the product can be modeled based on the product dimensions, color, configuration, and size. This is the only option that can be set up directly with product variants. Any combination of the product dimensions is allowed. A configuration technology that is used to create product variants by selecting values for product dimensions. Any combination of the product dimensions is permitted. The advantage of the dimension configuration is that only one product is required for a bill of material. With this type the product can be used in the Product Configurator. To select this type, the product dimension group must have a configuration selected, and no other product dimensions can be enabled. The constrain-based configuration used the attributes described earlier.

Dimension-based configuration

Constraint-based configuration

NOTE: Rule-based configuration is used for items that implement the Product builder functionality. This option is only available for customers who are upgrading from an earlier version. This option will be removed in future releases. Therefore it is recommended that you move to the Constraint-based configuration option.

Product Variant Creation Process


To create a new product variant, follow this six-step process. 1. Create and define the product master. 2. Create the product dimensions (sizes, colors, or configurations). 3. Create the product variants (valid combinations of product dimensions). 4. Release the product variants to legal entities. 5. Define legal entity specific data. 6. Use the product.

5-16

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


Variant Configuration Technology Pattern
This pattern applies to the EcoResVariantConfigurationTechnology table. In Microsoft Dynamics AX 2012, the product master contains a mandatory policy that identifies the structure of its variant creation. This shared policy is called "variant configuration technology." This setup identifies the only possible feature that can be used to create related product variants. The Microsoft Dynamics AX 2009 code base is adjusted and modified to follow the product master setup so that any modification in this area should also be adjusted.

Product Dimension Values Pattern


This pattern applies to the following: EcoResProductMasterDimValue and EcoResProductVariantDimValue hierarchies InventDim

Product dimensions are shared and are attribute-based. Three predefined attributes exist, representing color, size, and configuration dimensions. These attributes are related to the product dimensions and are distinctively different than the EcoRes* attributes framework in Microsoft Dynamics AX 2012. The product dimension values are stored in a shared, immutable table (EcoResColor, EcoResSize, and EcoResConfiguration). The database schema around product dimensions allows adding new attributes, which can be used to represent new product dimensions. For example, you could have T-shirt sizes (S, M, L) and shoe sizes (8, 10, 12). The product master holds relations to all possible product dimensions values within one product attribute. The product variant holds oneand only one relation to the product dimensions value within one product attribute. The InventDim structure holds the relationships to the shared product dimension values.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-17

Development IV in Microsoft Dynamics AX 2012


The system allows lookup only of legal-entityspecific product dimensions on the order line and always validates them against release product variants for the current legal entity. On the shared level (product management forms, tables, and so on), the system allows lookup of all product dimensions and validates them again all product variants.

FIGURE 5.8 PRODUCT DIMENSION VALUES DATA MODEL

Released Product and Released Product Variant Pattern


This pattern applies to the following tables. InventTable InventDimCombination

Products and product variants must be released to a specific legal entity before they can be used with that legal entity. The InventTable and its associated tables use the concept of the released product and can also be treated as the instance of the particular product in the current company. The mandatory product foreign key is added to the InventTable. The InventTable represents the instance of either a product master or a distinct product.

5-18

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


The InventDimCombination table and its associated tables use the concept of the released product variant and can also be treated as the instance of a product variant in the current company. The mandatory DistinctProductVariant foreign key is added to the InventDimCombination table. The InventDimCombination always represents the instance of a product variant.

Managing Inventory Policies


Item model groups are an important part of configuring product for stock, inventory management and accounting. Item model groups contain settings that determine how items are controlled and handled upon item receipt and issue. Item model groups determine the following stock and inventory policy: Whether the product is stocked or not stocked. The cost flow assumption and cost measurement method for valuing inventory of stocked products. If physical and financial negative inventory is permitted. If inventory transactions should be posted to the General Ledger. The workflow that is used when you send or receive items. The reservation rules.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-19

Development IV in Microsoft Dynamics AX 2012


An item model group setup is important when you determine how the item will integrate with other areas of the Microsoft Dynamics AX 2012 system. You can view the item model groups by opening Inventory and warehouse management > Setup > Inventory > Item model groups.

FIGURE 5.9 ITEM MODEL GROUPS FORM

If an item model group is set up for a not stocked product, many of the parameters are irrelevant. The following table displays the parameters that are relevant to a product that are maintained in stock versus products that are not maintained in stock. Check box Physical negative inventory Financial negative inventory Quarantine management Consolidated picking method Post physical inventory Post financial inventory Post to Deferred Revenue Account on Sales Delivery Stocked Relevant Relevant Relevant Relevant Relevant Relevant Relevant Not Stocked Irrelevant Relevant Irrelevant Irrelevant Irrelevant Irrelevant Relevant

5-20

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


Check box Accrue liability on product receipt Stocked Relevant NOTE: Check box is selected. when Post physical inventory is Selected. Relevant Relevant Relevant Relevant Relevant Relevant Not Stocked Relevant.

Registration requirements Receiving requirements Picking requirements Deduction requirements Date-controlled Backward from ship date

Irrelevant Relevant Irrelevant Relevant Irrelevant Irrelevant

When a product is defined as not stocked, there are several differences in how transactions are handled, and certain types of transactions are restricted. For example, when a not stocked product is added to a purchase order, the system will not track the on hand quantity or create an inventory transaction (inventTrans table record). You can process this purchase order in the same manner as the purchase order with stocked product. The following figure shows the data model for item groups and item model groups.

FIGURE 5.10 ITEM GROUP AND ITEM MODEL GROUP DATA MODEL

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-21

Development IV in Microsoft Dynamics AX 2012

Lab 5.1 - Product Information Management Workshop


This lab will demonstrate how to perform the following tasks: Add a new field to the product. Synchronize the new field with released products. Update the validation to make the field required.

Estimated time to complete: 20 minutes Scenario Isaac, the Business Systems Applications developer, received a request to add a new field to the products that will track the manufacturer's suggested retail price (MSRP). The requirements specify that the field must be added to the All products and product masters details form. The new field must also be copied to the released products and users should be able to override this field for each legal entity. However, the field is required and validation must be added to make sure that a value is entered.

Challenge Yourself!
By using the provided information, add a new field to the product that is copied to the released product. Make sure that the field can be edited and that it is required by adding logic into the Validate button on the Released products form.

Need a Little Help?


1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Create a new project. Create a new extended data type for the MSRP. Add a new field to the EcoResProduct table. Add the new field into a new field group. Add the new field group to the All products and product masters detail form. Add a new field to the InventTable table. Add the new field into a new field group. Add logic to the initFromEcoResProuct method to copy the value entered in the EcoResProduct table to the InventTable. Add the new field group to the Released products form. Test that the new field exists on both forms and that it is copied to the released product. Add logic to the validateProducts method so that the Validate button on the Released products form requires the new field.

5-22

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


Step by Step: Add the MSRP Field
Follow these steps to create a new project. 1. 2. 3. 4. 5. Open the Development workspace. Open the Projects window. Right-click the Shared node and then click New > Project. Right-click the new project and select Rename. Enter a name for the project such as ProductInformationManagementWorkshop. 6. Double-click the project to open it, and then close the Projects window. Follow these steps to add the MSRP 1. In the AOT window expand the Data Dictionary node. 2. Right-click the Extended Data Types node and select New > Real. 3. In the Properties window, set the following values on the new real. a. Name = MSRP b. Label = MSRP c. Help text = Manufacturer's suggested retail price for the product. d. Extends = Price 4. Save the extended data type. 5. Drag the newly created MSRP extended data type into the project that you created in step 3. Follow these steps to add the MSRP field to the EcoResProduct table and the EcoResProductDetails form. 1. Under the Data Dictionary node in the AOT window, expand tables and locate the EcoResProduct table. 2. Drag the table into the project that you created in step 3. 3. Expand the EcoResProduct table. 4. Select the MSRP extended data type and drag it to the Fields node of the EcoResProduct table. 5. Save the table. 6. Right-click the Field groups node and then click New Group. 7. Set the following values in the Properties window. a. Name = MSRP b. Label = MSRP 8. Select the MSRP field from the Fields node on the EcoResProduct table, and then drag it into the MSRP Field group.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-23

Development IV in Microsoft Dynamics AX 2012


9. Save the table. If the Synchronize table window opens, click Continue. 10. In the AOT window, expand Forms and then locate the EcoResProductDetails form. 11. Drag the EcoResProductDetails form into the project that you created in step 3. 12. Save the project. 13. Right-click the EcoResProductDetails form and then click Restore. 14. In the Data Sources node of the form browse to EcoResProduct > Fields and then select the MSRP field group (folder) from the list. 15. Drag the MSRP field group into the bottom of the GeneralIFT tabpage under the Design node of the form. (To locate the GeneralIFT tabpage, browse to Designs >Design > Tab:Tab > TabPage:Details > Group:GroupDetails > Tab:General > TabPage:GeneralIFT in the EcoResProductDetails form.) 16. Right-click on the EcoResProductDetails form and then click Open. 17. Verify that the new MSRP field is available.

FIGURE 5.11 PRODUCT DETAILS FORM WITH THE MSRP FIELD

18. Close the Product details form, and go back to the Development workspace. Follow these steps to add the MSRP field to the InventTable and the EcoResProductDetailsExtended form. 1. In the AOT, locate the InventTable under the Tables node of the Data Dictionary. 2. Drag the InventTable into the project that you created earlier.

5-24

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


3. Expand the InventTable table. 4. Select the MSRP extended data type and drag it to the Fields node of the InventTable table. 5. Save the table. 6. Right-click the Field Groups node and then click New Group. 7. Set the following values in the Properties window. a. Name = MSRP b. Label = MSRP 8. Select the MSRP field from the Fields node of the InventTable and then drag it into the MSRP Field Group node. 9. In the AOT window, expand Forms and then locate the EcoResProductDetailsExtended form. 10. Drag the EcoResProductDetailsExtended form into the project that you created earlier. 11. Save the project. 12. Right-click the EcoResProductDetailsExtended form and then click Restore. 13. In the Data Sources node of the form browse to InventTable > Fields and then select the MSRP field group (folder) from the list. 14. Drag the MSRP field group into the bottom of the TabPageSales tabpage under the Design node of the form. (To locate the TabPageSales tabpage, browse to Designs >Design > Tab:Tab > TabPage:Details > Tab:TabHeader > TabPage:TabPageSales in the EcoResProductDetailsExtended form.)

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-25

Development IV in Microsoft Dynamics AX 2012


15. Right-click on the EcoResProductDetailsExtended form and then click Open. 16. Verify that the new MSRP field is available.

FIGURE 5.12 RELEASED PRODUCT DETAILS FORM WITH THE MSRP FIELD

17. Close the Released product details form and go back to the Development workspace.

Step by Step: Copy the MSRP Field from the EcoResProduct Table to the InventTable
Follow these steps to copy the value in the MSRP field from the EcoResProduct table to the InventTable when a product is released. 1. In the Project window, locate the InventTable. 2. Expand the Methods node of the InventTable table and locate the initFromEcoResProduct method. 3. Right-click the initFromEcoResProduct method and then click View Code. 4. Assign the MSRP product value to the MSRP field on the inventTable by adding the following code before the if statement. "this.MSRP = _ecoResProduct.MSRP;" 5. Save and compile the InventTable table.

5-26

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module


Step by Step: Test the MSRP Field
To test the solution and verify that the MSRP field is copied from the product to the released product, follow these steps. 1. Open Product information management > Common > Products > All products and product masters. 2. Create a new product by clicking Product in the New group of the Action Pane. 3. Enter a unique number for the product, and then click OK. 4. Click Edit on the Maintain group of the Action Pane. 5. Enter an amount in the MSRP field. 6. Click Release products. 7. Click the Companies tab. 8. Select CEU, and then click OK. 9. Close the form. 10. Open Product information management > Common > Products > Released products. 11. Select the product that you released in step 8. 12. Click Edit in the Maintain group of the Action Pane. 13. Verify that the MSRP field is populated with the amount that you entered for the product in step 5. 14. Close the form.

Step by Step: Add Validation to the MSRP Field


To add logic to check for the MSRP field to be populated when you click the Validate button on the Released products form, follow these steps. 1. Open the Development Workspace. 2. In the AOT window, expand Classes and then locate the EcoResProductValidationService class. 3. Drag the class into the project that you created earlier. 4. Expand the class and right-click the validateProducts method and then click View Code. 5. Declare a new boolean variable called MSRPSet (boolean MSRPSet = false;) 6. Add the following code to check for the MSRP field value to be greater than zero after line 62 in the method.
MSRPSet = (InventTable::find(itemId).MSRP > 0) ? true : false; After line 64 add the following code. if (!MSRPSet)

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-27

Development IV in Microsoft Dynamics AX 2012


{ fieldList.addEnd("MSRP"); }

7. Save and compile the class. 8. Save the project. 9. To test the new logic, open the Released products form (Product information management > Common > Products > Release products.) 10. Select a product where the MSRP is set to 0.00. 11. Click the Validate button. 12. Verify that a you have received a warning message that states the MSRP field must be specified. 13. Close all the windows. TIP: You can compare your solution to the AX2012_ENUS_DEVIV_05_01_LAB_SOL.xpo file provided with the training image by importing the XPO file and then comparing the objects.

5-28

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module

Summary
The Product information management module provides functionality to set up and maintain the details of products across legal entities and to set up legal entity specific data for released products. The module also includes functionality that will categorize products, create and store custom product attribute details for each product, and support the entry of translations for many fields on the product details. Dimension groups can be used to determine which inventory dimensions should be used for a product. They include the following: Product dimensions that includes size, color, and configuration. Storage dimensions that includes site, warehouse, locations, and pallets. Tracking dimensions that include batch and serial numbers.

NOTE: More information about the item-product data model, upgrade for earlier releases, and coding patterns can be found in the Implementing ItemProduct Data Management Framework for Microsoft Dynamics AX 2012 white paper at https://go.microsoft.com/fwlink/?LinkId=246121.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-29

Development IV in Microsoft Dynamics AX 2012

Test Your Knowledge


Test your knowledge with the following questions. 1. TRUE or FALSE? All products are stored as system master data, which allows organizations to create and maintain shared product definition data. ( ) True ( ) False 2. Which of the following fields must be populated to validate a product that will be used on a transaction such as a sales order? (Select all that apply) ( ) Item group ( ) Item model group ( ) Product description ( ) Storage dimension group 3. Match the descriptions with the correct item. _____ 1. Includes the product definition, which can have variants in product dimensions (color, size, and configuration). _____ 2. Includes a product that has several associated product dimension values (color, size, and configuration). _____ 3. Includes a product that does not vary in product dimensions and therefore cannot have a product dimension group associated to it. _____ 4. Used for entering descriptions and product names for multiple languages. a. Product Translations b. Product Master c. Product Variant d. Distinct Product

5-30

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Chapter 5: Use and Design of the Product Information Management Module

Quick Interaction: Lessons Learned


Take a moment and write down three key points you have learned from this chapter 1.

2.

3.

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

5-31

Development IV in Microsoft Dynamics AX 2012

Solutions
Test Your Knowledge
1. TRUE or FALSE? All products are stored as system master data, which allows organizations to create and maintain shared product definition data. () True ( ) False 2. Which of the following fields must be populated to validate a product that will be used on a transaction such as a sales order? (Select all that apply) () Item group () Item model group ( ) Product description () Storage dimension group 3. Match the descriptions with the correct item. b 1. Includes the product definition, which can have variants in product dimensions (color, size, and configuration). c 2. Includes a product that has several associated product dimension values (color, size, and configuration). d 3. Includes a product that does not vary in product dimensions and therefore cannot have a product dimension group associated to it. a 4. Used for entering descriptions and product names for multiple languages. a. Product Translations b. Product Master c. Product Variant d. Distinct Product

5-32

Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement

Vous aimerez peut-être aussi