web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Finding attribute values ​​in the product configuration model.

(0) ShareShare
ReportReport
Posted on by
For the past few days, I've been trying to retrieve the value of the configuration model associated with a product number if such a configuration model exists. I think I've finally succeeded. As far as I could tell, I couldn't find any detailed information on this topic, so I wanted to note it here in case it might be useful to you.

 EcoResProduct                       ecoResProduct;
 PCProductModelVersion               pcProductModelVersion;
 PCProductConfigurationModel         pcProductConfigurationModel;
 EcoResCategory                      ecoResCategory;
 EcoResCategoryAttribute             ecoResCategoryAttribute;
 EcoResAttribute                     ecoResAttribute;
 ECORESVALUE                         ecoresvalue;
 EcoResEnumerationAttributeTypeValue ecoresenumerationattributetypevalue;
 EcoResAttributeType                 ecoresattributetype;
 EcoResTextValue                     ecorestextvalue;
 
while select ecoResProduct
where ecoResProduct.DisplayProductNumber == _inventTable.ItemId // 
you can enter the item code you want here.

join pcProductModelVersion
    where pcProductModelVersion.ProductMaster == ecoResProduct.RecId
       && pcProductModelVersion.IsActive == NoYes::Yes 

join pcProductConfigurationModel
    where pcProductConfigurationModel.RecId == pcProductModelVersion.Model

join ecoResCategory
    where ecoResCategory.RecId == pcProductConfigurationModel.RootComponentClass

join ecoResCategoryAttribute
    where ecoResCategoryAttribute.Category == ecoResCategory.RecId

join ecoResAttribute
    where ecoResAttribute.RecId == ecoResCategoryAttribute.Attribute

join ecoresattributetype
    where ecoresattributetype.RecId == ecoResAttribute.AttributeType

join ecoresenumerationattributetypevalue
    where ecoresenumerationattributetypevalue.AttributeType == ecoresattributetype.RecId

join ecoresvalue
    where ecoresvalue.RecId == ecoresenumerationattributetypevalue.Value

join ecorestextvalue
    where ecorestextvalue.RecId == ecoresvalue.RecId
{
  //some logic here...
}

Caution !! 


You cannot access the 'ecorestextvalue' table in SQL.
If you want to run it in SQL, remove the relevant line.

SQL:
select ep.RECID,pmv.MODEL,pcm.NAME,erc.NAME,eca.NAME,ecatv.VALUE,* from ECORESPRODUCT ep
join PCPRODUCTMODELVERSION pmv on ep.RECID = pmv.PRODUCTMASTER and pmv.ISACTIVE =1
join PCProductConfigurationModel pcm on pcm.RECID = pmv.MODEL
join ECORESCATEGORY erc on erc.RECID = pcm.ROOTCOMPONENTCLASS
join ECORESCATEGORYATTRIBUTE erca on erca.CATEGORY = erc.RECID
join ECORESATTRIBUTE eca on eca.RECID = erca.ATTRIBUTE 
join EcoResAttributeType ecat on ecat.RECID = eca.ATTRIBUTETYPE
join EcoResEnumerationAttributeTypeValue ecatv on ecatv.ATTRIBUTETYPE = ecat.RECID
join ECORESVALUE erv on erv.RECID = ecatv.VALUE
where ep.DisplayProductNumber='102198' //itemId here.

 
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,520 Super User 2025 Season 2 on at
    Hi,
     
    As I understand. you don't need an answer. Thanks for sharing your findings. There is indeed not much public documentation on this topic.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 221 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 151 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 46

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans