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
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.
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();
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 4
Guy Terry 2 Moderator
Martin Dráb 2 Most Valuable Professional