Coder Social home page Coder Social logo

product-flavor-dimension-sample-app's Introduction

Product flavor dimension sample app

Abstract

Project is meant to showcase the way to add new product dimension in a completely overlayering free way.

Supported scenario so far

  1. Create flavor dimension values.
  2. Create a product dimension group that includes the flavor dimension.
  3. Create a flavor dimension group with few values.
  4. Create a product master and assign earlier created product dimension group.
  5. Either choose predefined flavor dimension group or edit master product dimensions and choose few flavors.
  6. Create variants for the product.
  7. Release the product/variants.
  8. Edit released product: adjust standard and alternate flavor dimension.
  9. Adjust quantity on hand for the released variants.
  10. Create purchase order, confirm and receive it.
  11. Create sales order, ship it.

Prerequisites

- Platform version 23 or later.
- Application version 8.0 or later.

Getting started

- Go to the metadata folder.

- Run the Install.ps1 powershell script. It might need to be be run with elevated priviligies as Administrator.
	Running this script will without warning replace the ProductFlavor and ProductFlavorIntegration models.
	This will delete any customizations made to either of these two models.

- Build/Rebuild the flavor models.

- Enable InventDimension1 and EcoResProductFlavor configuration keys with the following X++ script: 

        ConfigurationKeySet set = new ConfigurationKeySet();
        set.loadSystemSetup();
        set.enabled(configurationKeyNum(InventDimension1),  true);
        set.enabled(configurationKeyNum(EcoResProductFlavor),  true);
        SysDictConfigurationKey::save(set.pack());
        SysSecurity::reload(true, true, true);

- Synchronize the database.
	If the database is synchronized before enabling the configuration keys, not all changes are made to the data model on the SQL database.

Extensibility guideline

NB:

  • It is often easier to copy elements of another product dimension that have same purpose (e.g. tables or forms to work with dimension values or groups, views, security privileges, menu items, etc).
  • Names for newly created objects can be easily changed and listed here to ease navigation in the code.
  • Extending an existing form is typically done in order to add new dimension related data sources or extra field
  • Extending form classes is typically done in order to add various metadata info about new dimension so that it is taken into account during the processing of a user input by the form.
  • Extending an existing table typically involves adding new fields, relations, changing field groups and indexes.

Steps:

General preparation
  • Create a configuration key that will correspond to the new dimension and use every time you create new table, view, form extension, EDT or any other element that can be marked with a config key.
  • Follow procedure explained in the blog post by Michael Fruergaard Pontoppidan in order to extend the product dimension class hierarchy.
  • Provide the way to store and manage dimension values by adding a table, form, display menu item and corresponding security privileges.
  • Create labels file in order to store new dimension text resources.
Defining a variant with new dimension
  • Extend EcoResProductMasterDimension form in order to add capability of defining available new dimensions for a product master.
  • Provide the way to add new dimensions to product master dimensions setup:
    • extend EcoResProductMasterDimension form, its corresponding class and table;
    • add new EcoResProductMaster[name] table to store the configured values;
  • Extend variant details forms in order to let user manage variants that have new dimension:
    • extend EcoResProductVariants form and form class;
    • same with EcoResProductVariantsPerCompany;
  • Provide the possibility to create dimension groups with predefined values by creating a set of objects:
    • tables Retail[name]GroupTable, Retail[name]GroupTrans and Retail[name]GroupTransTranslation to store dimension group header, lines and translations respectively;
    • form Retail[name]GroupTable in order to manage dimension groups;
    • display menu item Retail[name]GroupTable and security privileges Retail[name]GroupsMaintain and Retail[name]GroupsView, they must be added to security duty extensions according to the desired accessibility level;
  • Extend product details form, its extended version and its form classes in order to let user ability to specify new dimension related properties.
Releasing a variant
  • Extend release relevant forms (at least EcoResProductRelease and EcoResProductReleaseSessions) to show a user new dimension values for variants being released.
Adjusting quantity
  • Extend InventProductDimensionLookup form class in order to support new dimension while selecting a variant.
Navigation
  • Extend ProductInformationManagement menu and add newly created diplay menu items (for dimension groups and dimension values forms).

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

product-flavor-dimension-sample-app's People

Contributors

microsoft-github-policy-service[bot] avatar microsoftopensource avatar moustafa-moustafa avatar msftgits avatar renedunweber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

product-flavor-dimension-sample-app's Issues

Getting Started points to invalid files

Several issues with the getting started guide:

  • The getting started guide assumes a RainMain folder which does not exist on public 7.3 dev machines.
  • The "\AxPackage\ChocolateyPackages\dirs" file does not exist in this repo.
  • The "\AxPackage\ChocolateyPackages\MetaPackagesApplication\PackageTable.csv" file does not exist in this repo.

Models are saved with SYS layer

The two models are saved with the layer = 0 (i.e. SYS), which means it is impossible for non-Microsoft developers to modify any elements. I believe the intent was to provide these as an example to work through - so perhaps this should be set to the ISV layer (8) - much like the Fleet Management sample?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.