Showing posts with label Dynamics. Show all posts
Showing posts with label Dynamics. Show all posts

Monday, April 1, 2019

Dynamics 365 F&O Export Import projects between environments

Sometimes, the developer needs to use the previous development in other projects, so To transfer elements to a different installation, you can use a project package file.


to use a project package file , just export project 
1-Export project

Right-click on your project and click export


set name and select the path that you need to save


A project package contains all the elements from the project.

 Project package files have the .axpp file name extension.

just wait until export finish


2-import project

To use the contents of a project package file, you must import the .axpp file into an installation.
go to dynamics 365 tab in visual studio and click import 



note
The elements from the project package file will be imported into the same model that they were exported from. If that model doesn’t exist in the installation, it will be created during the import process.

you can check this link for more details.

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/projects

specify the location for project file that you need to import and click overwrite if you need to overwrite the existing element


also, you can open this project in the current solution or create new if you need

you can select all elements or specific element form details, just check or uncheck

click OK


click ok to reload

also, the built must be stopped before the project can be closed


you can stop built from the built tab and click cancel


you can view history to compare the previous version and checked in version to see the difference.

just right click on your element and click view history


Thanks.

Monday, February 27, 2017

Ax 2012 Alternative items in production

Introduction:

after a lot of googling on "Alternative items in AX 2012 R3 Production Orders", i found only one answer "use plan group which located in formula line Form", I tried this way more than 4-8 times with no result. I already asked some consultant peoples about what i need to create groups of raw material items and link some alternative items with them group and when one item used in production formula doesn't have enough quantity use another item on the same group which have enough quantity for the production order, they also told me the same way which i found it on google and when i told them that i tried it they told me that you need cumulative update  but i tried to update and also no result but i found that the Plan Group only work on Planned Orders or MRP "Master Plan"
 So i decided to found another way to do my job Let's Start......

  1. Create table for Items Group
  2. Create table for Alternative Items linked with them group
  3. Create form to Insert/Update/Delete Items or Groups 

In Class ProdUpdStartUp there is a lot of functions responsible for production starting stage one of them Called updateBOMConsumption()  this function trigger while you start the production order we have to make minor customization in this function to check each item have enough quantity for the production order or not, if the item doesn't have enough quantity search for another item in its group alternative to it. As below:


prodBOM.selectForUpdate(true);
//Start of customization   

           availQty = ItemInfo::ItemQtyByInventDimId(prodBom.inventDim().inventDimId,prodBom.ItemId);
           itemConsumeQty = (prodTable.QtyStUp * prodBOM.BOMQty)/prodBOM.BOMQtySerie;
           
           if(itemConsumeQty > availQty)
           {
                
               altInventDim =  prodBom.InventDim();
               c = AlternativeItems::findItemId(prodBom.ItemId,itemConsumeQty,altInventDim);
               if (c && conpeek(c,1) != "")
                {
                    altItemId = conpeek(c,1);
                    prodBom.ItemId = altItemId;
                    if (altInventDim)
                        prodBom.InventDimId = altInventDim.inventDimId;
                    else
                        prodBom.InventDimId = InventDim::inventDimIdBlank();
                }
            }

//End of customization

findItemId is a method on table that we create to find suitable item have enough qty for production order
ItemInfo is class contain function that return the physical available qty on given InventDimId