My 2p about ERP Solutions, Information Worker Solutions and other software products (mainly Microsoft Dynamics AX and Microsoft SharePoint).

02 November 2010

Creation of Intercompany Purchase order for a project item requirement

by Patrik Luca 1 comments

Tag



Business requirement: creation of Intercompany Purchase order for a project item requirement

Upon creating an Intercompany Purchase Order based on a project item requirement, the Purchase Order is of type Journal and is uneditable. Hence the Intercompany Sales Order isn’t created neither in the vendor company account and it can’t be created neither as the Intercompany Purchase Order is uneditable.

This behaviour can be easily simulated on the demo data:

  1. Create an item requirement on a project.
  2. Click Functions > Create purchase order.
  3. Select the Include check box in the line for the project item requirement and verify that vendor 9100 is selected in the Vendor field.

Solution: Adapt class SalesTableType

A small X++ code fix can solve this problem in class SalesTableType, method syncPurchTable.

if (_salesTable.fieldChanged(fieldnum(SalesTable, SalesType))) 
{
    switch(salesTable.SalesType)
    {

        case SalesType::Subscription    :  
axPurchTable.parmPurchaseType(
PurchaseType::Subscription);
break;

        case SalesType::Sales           :  
axPurchTable.parmPurchaseType(
PurchaseType::Purch);       
break;

        case SalesType::ReturnItem      :  
axPurchTable.parmPurchaseType(
PurchaseType::ReturnItem);  
break;

        case SalesType::Blanket         :  
axPurchTable.parmPurchaseType(
PurchaseType::Blanket);     
break;

        // BEGIN: intercompany chain for item requirements
        case SalesType::ItemReq         :  
axPurchTable.parmPurchaseType(
PurchaseType::Purch);       
break;
        // END: intercompany chain for item requirements


        default :
axPurchTable.parmPurchaseType(
PurchaseType::Journal);

    }
}


Upon creating an Intercompany Purchase Order, it won’t be of type Journal anymore and the Intercompany Sales Order in the vendor company account will be created automatically too.


Comments 1 comments
Unknown said...

Patrik,

Do you know if this defect was fixed in subsequent releases of AX? i am struggling to make this work in R3 CU8.

Thanks in advance,

Mike K
IBM

Patrik Luca, Ieper, BELGIUM
Feel free to use or spread all of the content on my blog. In return, linking back to my blog would be greatly appreciated. All my posts and articles are provided "AS IS" with no warranties.

Subscribe feeds via e-mail
Subscribe in your preferred RSS reader

Subscribe feeds rss Most Read Entries

Subscribe feeds rss Recent Entries

Categories

Recommended Books


Subscribe feeds rss Recent Comments

This Blog is part of the U Comment I Follow movement in blogosphere. Means the comment field of this blog is made DOFOLLOW. Spam wont be tolerated.

Blog Archive

My Blog List

Followers

Links