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

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...