New products auto set to stop on creation AX 2012

Hi Guys,

First post so if im in the wrong place please forgive me haha.

My company are looking to roll out AX 2012 late this year and im tasked with getting some simple setup done that is similar to there current setup.

What i need is a way of Setting items to stop when they are created.

By stopped i mean

Default Order Settings > Purchase order > stopped =1

Default Order Settings > Sales Order > stopped =1

Default Order Settings > stock > stopped =1

any help would be great.

Kind Regards

Karl

Hi Karl,

We have a very similar setup in conjunction with a New Product workflow. The item is created in All Products and then released to a given legal entity. Within the InventTable.insert() method, after the call to super(); we have another table method called insertInventItemOrderSetup();

private server void insertInventItemOrderSetup()

{

if (!InventItemPurchSetup::findDefault(this.ItemId))

{

InventItemPurchSetup::insertDefault(this.ItemId);

}

if (!InventItemInventSetup::findDefault(this.ItemId))

{

InventItemInventSetup::insertDefault(this.ItemId);

}

if (!InventItemSalesSetup::findDefault(this.ItemId))

{

InventItemSalesSetup::insertDefault(this.ItemId);

}

}

This defaults the item to a stopped state, and our workflow status is in Draft. At the final approval step in the workflow, the workflow processing class will unstop all of these modules as well as set the status to ‘Approved’ for that item. We also set Master Planning to only run on items with a workflow status of Approved so that Draft items are skipped for planning purposes.

Cheers,
S

Thanks for the reply, really helpful and very similar to what i am planning to do. I have already follow the steps on http://extendingdynamicsax.com/2013/11/06/developing-a-product-approval-workflow-in-dynamics-ax-2012/ .

so if my right i just need your code above to set items up as stopped and then the edit the code for my workflow to ‘unstop’ the items.

does this sound correct?

thanks

Karl