Get product attributes and values for all product in AX 2012
static void SSProductAttributes(Args _args)
{
EcoResProductAttributeValue ecoResProductAttributeValue;
EcoResAttribute ecoResAttribute;
EcoResValue ecoResValue;
InventTable inventTable;
while select inventTable
//where inventTable.ItemId == "TestProduct"
join ecoResProductAttributeValue
where ecoResProductAttributeValue.Product == inventTable.Product
join ecoResAttribute where ecoResAttribute.RecId == ecoResProductAttributeValue.Attribute
join ecoResValue where ecoResValue.RecId == ecoResProductAttributeValue.Value
{
info(strfmt("%1,%2, %3", inventTable.ItemId, ecoResAttribute.Name,ecoResValue.value()));
}
}
static void SSProductAttributes(Args _args)
{
EcoResProductAttributeValue ecoResProductAttributeValue;
EcoResAttribute ecoResAttribute;
EcoResValue ecoResValue;
InventTable inventTable;
while select inventTable
//where inventTable.ItemId == "TestProduct"
join ecoResProductAttributeValue
where ecoResProductAttributeValue.Product == inventTable.Product
join ecoResAttribute where ecoResAttribute.RecId == ecoResProductAttributeValue.Attribute
join ecoResValue where ecoResValue.RecId == ecoResProductAttributeValue.Value
{
info(strfmt("%1,%2, %3", inventTable.ItemId, ecoResAttribute.Name,ecoResValue.value()));
}
}
No comments:
Post a Comment