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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Matching record with key 'Product': for the data source 'EcoResProductCategory' does not exist

(0) ShareShare
ReportReport
Posted on by

Hello,

I try to create Released product and its attributes with the below code, using data entities. (Runnable class).

Product is created and released sucesfully.

When the line "ecoResProductAttributeValueEntity.insert();" is executed I'm getting the error message "Matching record with key 'Product': 68719519121 for the data source 'EcoResProductCategory' does not exist".

After it I tried to create value in EcoResProductCategory too. It is also created sucesfully, but at the end I still get the same error from EcoResProductAttributeValueEntity.insert();

I'm trying to do it now in job, but later I have to develop the csv file import, which should create Released products, create / assign Attributes to it, etc...

What am I doing wrong?

EcoResReleasedProductCreationV2Entity ecoResReleasedProductCreationV2Entity;

ecoResReleasedProductCreationV2Entity.clear();
ecoResReleasedProductCreationV2Entity.initValue();
ecoResReleasedProductCreationV2Entity.ItemNumber = 'AAA_Item';
ecoResReleasedProductCreationV2Entity.ItemModelGroupId = 'GDD';
ecoResReleasedProductCreationV2Entity.InventoryUnitSymbol = 'ea';
ecoResReleasedProductCreationV2Entity.ProductGroupId = 'FG';
ecoResReleasedProductCreationV2Entity.ProductType = EcoResProductType::Item;
ecoResReleasedProductCreationV2Entity.ProductNumber = 'AAA_Item';
ecoResReleasedProductCreationV2Entity.ProductSearchName = 'AAA_Item';
ecoResReleasedProductCreationV2Entity.ProductName = 'AAA_Item';
ecoResReleasedProductCreationV2Entity.TrackingDimensionGroupName = 'None';
ecoResReleasedProductCreationV2Entity.ProductSubType = EcoResProductSubtype::Product;
ecoResReleasedProductCreationV2Entity.SearchName = 'AAA_Item';
ecoResReleasedProductCreationV2Entity.SalesUnitSymbol = 'ea';
ecoResReleasedProductCreationV2Entity.StorageDimensionGroupName = 'SiteWH';
ecoResReleasedProductCreationV2Entity.PurchaseUnitSymbol = 'ea';
ecoResReleasedProductCreationV2Entity.insert();

EcoResProductCategory ecoResProductCategory;
ecoResProductCategory.clear();
ecoResProductCategory.initValue();
ecoResProductCategory.Product = EcoResProduct::findByProductNumber(ecoResReleasedProductCreationV2Entity.ProductNumber).RecId;
ecoResProductCategory.Category = 68719484036;
ecoResProductCategory.CategoryHierarchy = 68719479747;
ecoResProductCategory.insert();

EcoResProductAttributeValueEntity ecoResProductAttributeValueEntity;
ecoResProductAttributeValueEntity.clear();
ecoResProductAttributeValueEntity.initValue();
ecoResProductAttributeValueEntity.ProductNumber = ecoResReleasedProductCreationV2Entity.ProductNumber;
ecoResProductAttributeValueEntity.AttributeName = "xxx";
ecoResProductAttributeValueEntity.BooleanValue = NoYes::Yes;

ecoResProductAttributeValueEntity.insert();

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,156 Super User 2025 Season 2 on at

    Hi DaxDev,

    Is the Attribute name 'xxx' a valid attribute in the environment? It might be checking a table relation here.

  • DAX Dev Profile Picture
    on at

    Hi Andre,

    Yes, I have validated that. There is the record in EcoResAttribute table for that attribute name

  • DAX Dev Profile Picture
    on at

    Strange thing is that the record is created in EcoResProductCategory table with the correct "Product", but still receiving the error

  • André Arnaud de Calavon Profile Picture
    301,156 Super User 2025 Season 2 on at

    Have you tried using these entities in a data management import project from a source file to see if that works with inserts?

  • Community Member Profile Picture
    on at

    Hi Dax Dev,

    Were you able to find a solution to this? I'm struggling with the same error when trying to insert attribute values via Logic Apps. Inserting exactly the same attribute value data on the same product through DMF works without any issues, but doing it from Logic Apps gives the error "Matching record with key 'Product': XXXX for the data source 'EcoResProductCategory' does not exist".

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Dax Dev,

    Are you using oData to push data to D365 for Logic Apps?

  • Community Member Profile Picture
    on at

    Hi Sergei,

    I'm using the built in D365 connector in Logic Apps, but I assume the connector is using odata.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Espen,

    Have you tried to get a record first to check if exists (get record by the same key or get list (to list all records) action)?

    Have you checked that the user associated with the application in D365 has the correct default company?

  • Community Member Profile Picture
    on at

    Thanks for pointing me in the right direction, Sergei!

    I did a check to see if the record existed, and indeed it did - although with an empty attribute value. So the solution was to update the record instead of creating a new one.

    Guess I was confused by the error message and did not see the obvious solution. Thanks again!

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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans