Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / X++ Code To Create Ite...
Finance forum
Suggested answer

X++ Code To Create Item Or Released Product in D365 FO

Posted on by 2,544

Please share me X++ Code To Create Item Or Released Product in D365 FO

  • Piyush Adhikari Profile Picture
    Piyush Adhikari 2,544 on at
    RE: X++ Code To Create Item Or Released Product in D365 FO

    Yes Please mark it as ANSWERED

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: X++ Code To Create Item Or Released Product in D365 FO

    Hi Piyush,

    Is the code you shared yourself your solution?

  • Suggested answer
    Piyush Adhikari Profile Picture
    Piyush Adhikari 2,544 on at
    RE: X++ Code To Create Item Or Released Product in D365 FO

    class CreateReleasedProduct

    {        

       /// <summary>

       /// Runs the class with the specified arguments.

       /// </summary>

       /// <param name = "_args">The specified arguments.</param>

       public static void main(Args _args)

       {        

           EcoResReleasedProductCreationV2Entity   ecoResReleasedProductCreationV2Entity;

           ;

           ecoResReleasedProductCreationV2Entity.clear();

           ecoResReleasedProductCreationV2Entity.initValue();

           ecoResReleasedProductCreationV2Entity.ItemNumber = '1104X';

           ecoResReleasedProductCreationV2Entity.ItemModelGroupId = 'Stocked';

           ecoResReleasedProductCreationV2Entity.InventoryUnitSymbol = 'ea';

           ecoResReleasedProductCreationV2Entity.BOMUnitSymbol = 'ea';

           ecoResReleasedProductCreationV2Entity.ProductGroupId = 'FG';

           ecoResReleasedProductCreationV2Entity.ProductType = EcoResProductType::Item;

           ecoResReleasedProductCreationV2Entity.ProductNumber = '1104X';

           ecoResReleasedProductCreationV2Entity.ProductSearchName = '1104X';

           ecoResReleasedProductCreationV2Entity.ProductName = '1104X';

           ecoResReleasedProductCreationV2Entity.TrackingDimensionGroupName = 'None';

           ecoResReleasedProductCreationV2Entity.ProductSubType = EcoResProductSubtype::Product;

           ecoResReleasedProductCreationV2Entity.SearchName = '1104X';

           ecoResReleasedProductCreationV2Entity.SalesUnitSymbol = 'ea';

           ecoResReleasedProductCreationV2Entity.StorageDimensionGroupName = 'SiteWH';

           ecoResReleasedProductCreationV2Entity.PurchaseUnitSymbol = 'ea';

           ecoResReleasedProductCreationV2Entity.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.

Helpful resources

News and Announcements

Forum Structure Changes Coming Soon!

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,734 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,021 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,150

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans