Friday 14 June 2024

Error : DA1023 - Could not resolve identity. The Microsoft Entra ID account is not mapped to an employee in Retail headquarters

DA1023 - Could not resolve identity. The Microsoft Entra ID account is not mapped to an employee in Retail headquarters.

Go to the Human Resource-Click on Worker select the cashire id

 Object reference not set to an instance of an object.



Ensure User ID (System Administration-->Users-->Users) is created for the "XXXXX@xyz.com" for e- mail id and attached "Telemetry ID" (Object ID for login id in Azure is available) and company.
Associate a Worker with AAD User
  • Select a Worker and in the Pane "Workers" select a Tab "Commerce"
  • Click on Associate existing identity and enter "XXXX@xyz.com" which is already created in Users.Alias,VPN,External Sub Identifiers gets updated in Workers

You will see 3 textboxes grouped under 'EXTERNAL IDENTITY' enter the below details:

  • Alias: email of the AAD User
  • UPN: email of the AAD User
  • External sub identifier: AAD User's Object ID
Run batch job 1060 Staff Job to POS.
Validate the device with related worker
Run the POS app





  • Select a Worker and in the Pane "Workers" select a Tab "Commerce"
  • Click "Edit" button in the toolbar
  • You will see 3 textboxes grouped under 'EXTERNAL IDENTITY' section,enter the below details:
  1. Alias: email of the AAD User
  2. UPN: email of the AAD User
  3. External sub identifier: AAD User's Object ID












Saturday 22 July 2023

Performance issue on BOM lines creation or BOM updating D365FO

If facing issue with Slow performance during the BOM line creation and existing BOM updating.

the issue here is that the BOM change triggers a circularity check once there're changes. The setup is using High complexity CC strategy that is quite heavy to execute synchronously. For reference, below is the screenshot.

 



Mitigation plan is to change BOM circularity check to run asynchronously in order not to disrupt UI experience AND critical business processes.

 

1) Go to Inventory management -> Setup -> Parameters -> Bill of material. Set level of circularity = Never (just means that CC should NOT run the check in UI but in the background)



 

2) Schedule a recurrent (e.g. weekly/nightly) batch table BOM circularity check job, preferably out of business hours.

 

Go to Product information management -> Periodic tasks -> Bill of materials and formulas -> Check BOM/formula. Set the following highlighted settings and setup recurrence: Keep BOM number to blank in order to ensure the delta of modified/created BOMs is checked. Example:


 


 

Once the batch job is completed, BOMs/formulas with no cycles will be unmarked for circularity check (check BOM = 0) => further downstream processes won't be impacted anymore. The check will not be triggered for those structures. BOMs/formulas with cycles will still be marked (check BOM = 1) until circularity is resolved. BOM form UI will also be smooth as a result of setup changes abovementioned with no form freeze.

Wednesday 12 July 2023

Data Management (DMF) entity for Item, Trade Agreement, Route, BOM ,Location,Project , Open PO/SO/Production/Transfer Order D365FO

Masters

Product -Item (DMF Entity)

Released product creation V2

Released products V2

Trade Agreements

Open purchase line discount journal lines

Open purchase price journal lines V2

Open sales line discount journal lines

Open sales price journal lines V2

Route

Route headers

Route versions V2

Route operations V2

Route operation properties V2

Resource requirements for route operation properties

Bill of Material (BOM)

Bill of materials headers

Bill of materials versions V4

Bill of materials lines V3  /*https://dynamicsaxsharma.blogspot.com/2023/07/bom-line-import-code-d365fo.html */

Location

Warehouse locations

 Project

Projects

Open Transactions

Open Purchase Order

Purchase order headers V2

Purchase order lines V2

Purchase order charges

Open Sales Order

Sales order headers V2

Sales order lines V2

Sales order charges V2

Open Transfer Order

Transfer order headers

Transfer order lines

Open Production Order

Production orders

Production bill of materials lines

BOM Line Import Code D365FO

Facing issue to slow import BOM lines through DMF- Bill of materials lines V3 (Data Management). Need to customize code to import BOM lines, after importing below through DMF

A. BOM Header

B. BOM Version


Using System.IO;

Using OfficeOpenXml;

Using OfficeOpenXml.ExcelPackage;

Using OfficeOpenXml.ExcelRange;


internal final class GMUploadBOMStaging

{

    /// <summary>

    /// Class entry point. The system will call this method when a designated menu 

    /// is selected or when execution starts and this class is set as the startup class.

    /// </summary>

    /// <param name = "_args">The specified arguments.</param>

    public static void main(Args _args)

    {

        System.IO.Stream stream;

        ExcelSpreadsheetName sheet;

        FileUploadBuild fileUpload,fileUploadBuild;

        DialogGroup dialogUploadGroup;

        FormBuildControl formBuildControl;

        Dialog dialog=new Dialog("BOM Lines Import");

        GMBOM   GMBOM;

        InventDim   InventDim;


        dialogUploadGroup = dialog.addGroup("@SYS54759");

        formBuildControl = dialog.formBuildDesign().control(dialogUploadGroup.name());

        fileUploadBuild = formBuildControl.addControlEx(classStr(fileUpload),"UploadExcel");

        fileUploadBuild.style(FileUploadStyle::MinimalWithFilename);


        fileUploadBuild.fileTypesAccepted(".xlsx");


        if(dialog.run())

        {

            FileUploadTemporaryStorageResult fileUploadResult = file::GetFileFromUser(classStr(FileUploadTemporaryStorageStrategy));


            if(fileUploadResult!= null && fileUploadResult.getUploadStatus())

            {

                stream=fileUploadResult.openResult();

                

                using(ExcelPackage  package= new ExcelPackage(stream))

                {

                    int rowCount, iterator;

                    package.Load(stream);

                    ExcelWorksheet worksheet= package.get_workbook().get_worksheets().get_Item(1);

                    OfficeOpenXml.ExcelRange range=worksheet.Cells;

                    rowCount = worksheet.Dimension.End.Row - worksheet.Dimension.Start.Row + 1;

                    

                    for(iterator=2;iterator<=rowCount;iterator++)

                    {

                        GMBOM.clear();

                        GMBOM.BOMConsump = BOMConsumpType::Variable;

                        GMBOM.BomWHSReleasePolicy = BomWHSReleasePolicy::AllowPartialReservation;

                        GMBOM.BOMId = range.get_Item(iterator, 2).Value;

                        GMBOM.BOMQty = range.get_Item(iterator, 3).Value;

                        GMBOM.BOMQtySerie = range.get_Item(iterator, 4).Value;

                        

                        if(range.get_Item(iterator,5).Value == "Item")

                            GMBOM.BOMType = BOMType::Item;

                        if(range.get_Item(iterator,5).Value == "Vendor")

                            GMBOM.BOMType = BOMType::Vendor;


                        if(range.get_Item(iterator,6).Value == "Yes")

                            GMBOM.Calculation = NoYes::Yes;

                        if(range.get_Item(iterator,6).Value == "No")

                            GMBOM.Calculation = NoYes::No;


                        GMBOM.Constant = range.get_Item(iterator,7).Value;

                        GMBOM.Density = range.get_Item(iterator,8).Value;

                        GMBOM.Depth = range.get_Item(iterator,9).Value;


                        GMBOM.EndSchedConsump = NoYes::No;

                        GMBOM.Formula = BOMFormula::Formula0;


                        GMBOM.FromDate = dateNull();


                        GMBOM.Height = range.get_Item(iterator,13).Value;

                        GMBOM.ItemBOMId = range.get_Item(iterator,14).Value;

                        GMBOM.ItemId = range.get_Item(iterator,15).Value;

                        GMBOM.ItemRouteId = range.get_Item(iterator,16).Value;

                        

                        GMBOM.LineNum = range.get_Item(iterator,17).Value;

                        GMBOM.LineCreationSequenceNumber = GMBOM.LineNum;

                        GMBOM.OprNum = 0;

                        GMBOM.PDSInheritCoProductBatchAttrib = NoYes::No;

                        GMBOM.PDSInheritCoProductShelfLife = NoYes::No;

                        GMBOM.PdsCWQty = range.get_Item(iterator,19).Value;

                        GMBOM.Position = range.get_Item(iterator,22).Value;


                        GMBOM.ProdFlushingPrincip = ProdFlushingPrincipBOM::Blank;

                        

                        GMBOM.RoundUp = BOMRoundUp::No;


                        GMBOM.RoundUpQty = range.get_Item(iterator,25).Value;

                        GMBOM.ScrapConst = range.get_Item(iterator,26).Value;

                        GMBOM.ScrapVar = range.get_Item(iterator,27).Value;

                        GMBOM.ToDate = dateNull();

                        GMBOM.UnitId = range.get_Item(iterator,29).Value;

                        GMBOM.VendId = range.get_Item(iterator,30).Value;

                        GMBOM.Width = range.get_Item(iterator,31).Value;

                        

                        GMBOM.WrkCtrConsumption = 0;

                        

                        GMBOM.InventSiteId = range.get_Item(iterator,38).Value;

                        GMBOM.InventLocationId = range.get_Item(iterator,39).Value;


                        InventDim.clear();

                        InventDim.inventSiteId = GMBOM.InventSiteId;

                        InventDim.InventLocationId = GMBOM.InventLocationId;

                        InventDim = InventDim::findOrCreate(InventDim);

                        GMBOM.InventDimId = InventDim.inventDimId;

                        GMBOM.insert();

                    }

                }

            }

        }

        else

        {

            Error("error occured.");

        }

    }


}

Saturday 1 July 2023

Error in Production Order "Inventory Dimension Location Must Be Specified" in D365FO

Getting Error in Production Order "Inventory Dimension Location Must Be Specified"


Solution: Update the location into BOM from production order (Production Details)




Error Production Order "Field Purchase Order Must be Filled In" D365FO

 Facing error "Field Purchase Order Must be Filled In" on Production Order during estimate or other production Process.

Production POXXXXXXXXX

   Calculating BOM Consumption

        Item number ITXXXXXX

              Field Purchase order must be filled in

Update has been cancelled.


Root Cause: Check the Purchase order number sequence must be "Continue" 

Wednesday 21 June 2023