Name is Anant Dubey and the intent to create this blog is to discuss the problems and issues that developer face in the dynamics AX development and to share the new things that come up with the new version of AX.

Friday, 27 February 2015

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;

No comments:

Post a Comment