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 :
Microsoft Dynamics AX (Archived)

How to Add a Product to Procurement Categories via x++ code

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have a list of Products to be added to procure categories via x++ code.

How could I do this ? is it possible to add via x++ code ?

regards,

MAnia

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Pradeep Itnal Profile Picture
    3,248 on at

    can you elaborate your question. try below first  is this what u want to achieve

    EcoResProductCategory           ecoResProductCategoryToCreate;

    ecoResProductCategoryToCreate.initValue();

               ecoResProductCategoryToCreate.Category =   ecoResCategory.RecId;(Should be passed as a parameter of type recid)

               ecoResProductCategoryToCreate.CategoryHierarchy = ecoResCategory.CategoryHierarchy; (Should be passed as a parameter of type recid)

               ecoResProductCategoryToCreate.Product = ecoResProduct.RecId; (your product recid)

               ecoResProductCategoryToCreate.insert();

  • Suggested answer
    Srini Ramidi Profile Picture
    2 on at

    Hello,

    It's pretty straight forward, look at the method   "selectProduct" in EcoResCategoryAddProduct form. You need find Category,CategoryHierarchy(EcoResCategory table) and Product(EcoResProduct) Record Id's and insert into

    EcoResProductCategory table.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans