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)

I need to add validation in MasterPlanning when creating PlanPurchaseOrder and PlanproductionOrder.

(0) ShareShare
ReportReport
Posted on by 30

Hi All,

I need to add validation in MasterPlanning when creating PlanPurchaseOrder and PlanproductionOrder.

Means requirement is : for example

If( value == Yes)

{

   // It should create PlanPurchaseOrder 

}

eslse

{

  // it should create PlanProductionOrder

}

Kindly let me in which class i need to do the modification. I don't have idea about Master Planning.

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    You could put a breakpoint in insert method of the planned order table (ReqPO) and debug it to see how the order type is determined.

    Normally if you want to know these kinds of things about the system, you should debug and use the cross references to find an answer.

    Please be aware that master planning is a very complex area in the system and you need to be careful and understand what you are doing if you customize it.

  • @rp@n Profile Picture
    30 on at

    Thanks Niokoloas,

    I need at add logic for SalesLine only. 

    All SalesOrder -- SO -- SalersLine

    7851.A1.jpg

    I saw below code :

    Class : ReqCalcExplode extnd ReqCalc

    Main() :

    if (common.RecId)
    {
    switch (common.TableId)
    {
    case tableNum(SalesLine) :
    salesLine = common;
    reqCalcExplode = ReqCalcExplodeSales::newSalesIdPrompt(salesLine.SalesId, salesLine.InventTransId);

    break;

    case tableNum(ProdTable) :
    prodTable = common;
    reqCalcExplode = ReqCalcExplodeProd::newProdTablePrompt(prodTable);

    break;

    case tableNum(PurchReqLine) :
    purchReqLine = common;
    reqCalcExplode = ReqCalcExplodePurchReqLine::newPurchReqLine(purchReqLine);

    break;
    }

    If i go further to check class ReqCalcExplodeSales . I am in to correct way ?

    Please give me more shed on this.

    Thanks!

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    What do you think? If you want to modify the sales process, and in the code there are three processes: one for sales, one for prod and one for transfer, which one would you pick?

  • @rp@n Profile Picture
    30 on at

    I need to check for SalesLine only.

    case tableNum(SalesLine) :

    salesLine = common;

    reqCalcExplode = ReqCalcExplodeSales::newSalesIdPrompt(salesLine.SalesId, salesLine.InventTransId);

    These are called separate class based on switch case.

    Am i correct?

    Kindly suggest me

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    So, you shared a code where we see that it calls different classes based on the switch case.

    And now you ask if it calls different classes based on the switch case. Correct?

    I'm sure you can answer your question yourself. Am I correct?

  • @rp@n Profile Picture
    30 on at

    Yes, Nikoloas,

    Already I shared earlier switch case which is called 3 different classes based on condition.

    Please give me more she'd on this

    Thanks!

  • @rp@n Profile Picture
    30 on at

    Hi ,

    Could you please let me know in which class and method I got creating of planned production order and planned purchase order.

    Kindly let me know the exact class and method name please.

    Thanks!

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Arpan,

    Can you provide the functional business scenario you are trying to achieve? Changing the master planning behavior might be a tricky one. If you tell what you want to achieve and why, we can possibly tell you if it is already standard behavior or a setting.

  • @rp@n Profile Picture
    30 on at

    Hi Andre,

    Sure, I need to add validation in MasterPlanning when creating PlanPurchaseOrder and PlanproductionOrder from Sales Order only.

    Means requirement is : for example

    If( value == Yes)

    {

      // It should create PlanPurchaseOrder

    }

    eslse

    {

     // it should create PlanProductionOrder

    }

    @ in above post I already provide the screen shot , from where they run master planning...

    Kindly let me in which class i need to do the modification. I don't have idea about Master Planning.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    No, could you share the actual business scenario / functional requirement?

    Normally you purchase some items and produce some items. Does your customer have some items that they produce themselves but on some occasion they will buy it? What is the occasion / criteria for determining this? I'm not a functional expert but maybe this requirement can be resolved by setup instead of development.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans