Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Any method to require item B to Purchase if Item A showed up in Planning Worksheet

Posted on by 15,428

Hi

We have many parts that they use together 95% of the time. They are all purchase item. But it is a chance they get out of sync for on hand for some reasons. Is it anyway that we setting BC the way that for example anytime Part A shows up in Planning Worksheet to order (PO) then Part B also shows up as well? I mean this way purchaser does not need to remember all "related" parts to manually add to the PO. 

Thanks 

  • MahGah Profile Picture
    MahGah 15,428 on at
    RE: Any method to require item B to Purchase if Item A showed up in Planning Worksheet

    Hi Alfredo

    Thanks for the idea. I think this will work for us. I can see how logic like substitute works here. Thanks

  • MahGah Profile Picture
    MahGah 15,428 on at
    RE: Any method to require item B to Purchase if Item A showed up in Planning Worksheet

    Thank Inge for the idea and pointer. That gave me some idea on how to design this development. Thanks again.

  • Verified answer
    Alfredo_Iorio Profile Picture
    Alfredo_Iorio 1,260 on at
    RE: Any method to require item B to Purchase if Item A showed up in Planning Worksheet

    We developed something similar in a recent project, we called it Complimentary Items.

    Every main item has a number of complimentary items that are assigned using a page similar to the item substitution.

    We have included a ranking score and a Qty Per field E.G one unit of item A gets 5 pieces of item B.

    The requirement was for sales and we enabled a few subpages to get the complimentary items in the sales order, and check availability by location and price lists.

    Eventually, we expended the code so that the planning worksheet gets the complimentary items in the lines together with the main one. The complimentary items are non-inventory, this makes it easy to copy the lines in the planning worksheet because we don't need to calculate planning parameters.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Any method to require item B to Purchase if Item A showed up in Planning Worksheet

    You could use another item no. at the item card.  F.ex Common Item no. if you don't do inter company transactions where you need that.

    Then subscribe to an event in the create PO from Req. worksheet process and and start to check if the items common item no. also is on the req. worksheet or not. If so add it either to the req. worksheet or directly on the PO.

    That saves you for doing much extensions on the item table and you can use one simple codeunit to handle it all.

    Maybe you can use one of these event subscribers?

    [EventSubscriber(ObjectType::Codeunit, Codeunit::AddOnIntegrManagement, 'OnAfterTransferFromReqLineToPurchLine', '', false, false)]

    local procedure OnAfterTransferFromReqLineToPurchLine(var PurchOrderLine: Record "Purchase Line"; var ReqLine: Record "Requisition Line");

    begin

    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Req. Wksh.-Make Order", 'OnAfterInsertPurchOrderLine', '', false, false)]

    local procedure OnAfterInsertPurchOrderLine(var PurchOrderLine: Record "Purchase Line"; var NextLineNo: Integer; var RequisitionLine: Record "Requisition Line"; var PurchOrderHeader: Record "Purchase Header");

    begin

    end;

  • MahGah Profile Picture
    MahGah 15,428 on at
    RE: Any method to require item B to Purchase if Item A showed up in Planning Worksheet

    Thanks Kim

    My struggle is now with modification. I am not sure what that modification looks like? I mean how I can force Planning Worksheet to show the second item or how make the second item to show up in PO. Any idea?

    Thanks

  • Suggested answer
    Dallefeld Profile Picture
    Dallefeld 11,425 User Group Leader on at
    RE: Any method to require item B to Purchase if Item A showed up in Planning Worksheet

    MahGah, there really is nothing to drive the purchase of two parts when one is needed to be reordered. I thought about assembly orders and production orders but there are ramifications to use those for an unintended purpose.  I think you are looking at a modification.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans