Where Not Used

theredmiatatheredmiata Member Posts: 18
I've been asked to write a where not used report and was wondering if anyone has done something similar? I've been looking at making a copy of the Where-Used Management codeunit updating the logic to achieve the output I'm looking for but want to see if someone else has produced such a report first.

Regards,

Ian

Comments

  • kinekine Member Posts: 12,562
    Question is, what is expected from the report? What it exactly should do?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • theredmiatatheredmiata Member Posts: 18
    The Where Not Used report is basically the opposite of the Where-Used report. When a user enters an item, the Where-Not Used report should show ALL production boms where the items currently does not exist.
  • vaprogvaprog Member Posts: 1,141
    Hi Ian

    I'd go about this like this:
    • Extend the Where Used codeunit so you can filter the internal temporary WhereUsedList, either by adding COPYFILTER statements to FindRecord and NextRecord, or by adding a SetRecordFilter function.
    • Create a report that lists all BOMs.
    • Call WhereUsedFromItem to set up Where Used Management.
    • For each BOM set a filter on the WhereUsedList."Production BOM No." and execute the following Code
      IF WhereUsedMgt.FindRecord('-',WhereUsedList) THEN
        CurrReport.SKIP;
      
Sign In or Register to comment.