Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, September 30, 2014

EcoResValue, EcoResAttribute with Item Id relation in AX

Hi,

static void AlfasithGetProductAttributes(Args _args)
{
    inventTable                 InventTable;
    EcoResProductAttributeValue ecoResProductAttributeValue;
    EcoResAttribute             ecoResAttribute;
    EcoResValue                 ecoResValue;
    EcoResTextValue             ecoResTextValue;

    InventTable = InventTable::find('1604');
    while select EcoResProductAttributeValue where EcoResProductAttributeValue.Product == InventTable.Product
    {
         select ecoResValue where ecoResValue.RecId == ecoResProductAttributeValue.Value;
         select ecoResTextValue where ecoResTextValue.RecId == ecoResProductAttributeValue.Value;
        info(strFmt("%1 - %2 - %3", InventTable.ItemId, ecoResAttribute.Name, ecoResValue.value()));
    }  
}

Regards,

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...