29 January 2022

How to get sales order delivery postal address Phone ,street in D365FO

 LogisticsPostalAddress deliveryPostalAddress = LogisticsPostalAddress::findRecId(salesTable.DeliveryPostalAddress);

deliveryPostalAddress.City;                   

 deliveryPostalAddress.State;

            

10 January 2022

How to get product variants in D365FO using X++

  public EcoResProductDisplayProductNumber getProductVariants(SalesLine _saleLine)

    {

        InventDimCombination            inventDimCombination  = InventDimCombination::findVariantId(_saleLine.RetailVariantId);

        InventDim                       inventDim;

        InventDistinctProductExpanded   inventDistinctProductExpanded;


        select inventDistinctProductExpanded

            where inventDistinctProductExpanded.ItemId == _saleLine.ItemId

            && inventDistinctProductExpanded.InventDimId == inventDimCombination.InventDimId;


        return inventDistinctProductExpanded.DisplayProductNumber;

    }

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension-...