Tuesday, 13 September 2016

Get item's id, brand, size and category in ax 2012

Get item's id, brand, size and category in ax 2012
static void FilterRecord(Args _args)
{
    EcoResProductCategory   ecoResProductCategory;
    EcoResProduct           ecoResProduct;
    InventTable             inventTable;
    InventTableModule       inventTableModule;
    EcoResCategory          ecoResCategory;
    S3_ItemMasterPurchase   S3_ItemMasterPurchaseloc,S3_ItemMasterPurchaselocal;
    int                     a;
    int64                   ecoresrecid,ecoresprodrecid;
    real                    mrp;
    boolean                 ret;


      while select ecoResProduct
        join inventTable where inventTable.Product == ecoResProduct.RecId //&& inventTable.PrimaryVendorId == "<Vendor Name>"
        join ecoResProductCategory where ecoResProductCategory.Product == ecoResProduct.RecId
        join ecoResCategory where ecoResCategory.RecId == ecoResProductCategory.Category
    {

        if(/*inventTable.StandardInventSizeId == "200x300" && inventTable.StandardConfigId == "BASIC"  &&*/ ecoResCategory.Name == "Durashield"/* && inventTable.PrimaryVendorId == "SOBER CERAMICS"*/)
       // {
            // ecoresrecid = ecoResCategory.RecId;
            info(strFmt("%1,%2",inventtable.ItemId,inventtable.StandardConfigId));
           }
   }
}

No comments:

Post a Comment

POSTMAN D365

  Postman is useful to test the behavior of different OData class from/to D365FO. In this post we will see the steps to setup Postman with D...