Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

cues having due date of items from Purchase Line table

(0) ShareShare
ReportReport
Posted on by 335

Hi Everyone,

I want to create a cue showing the Due Items from Purchase Line table and Purchase Order Subform page, The cue should show the of count of the number of items having today and future as their Promised Receipt date.

Regards,

Rupali

  • Meli Profile Picture
    15 on at
    RE: cues having due date of items from Purchase Line table

    Hello Rupali, 

    May we have the final working code

    Thanks

  • Rupali  Profile Picture
    335 on at
    RE: cues having due date of items from Purchase Line table

    Its Done.Thanks.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,031 on at
    RE: cues having due date of items from Purchase Line table

    Send me the new code

  • Rupali  Profile Picture
    335 on at
    RE: cues having due date of items from Purchase Line table

    I did that already ,still it is not filtering my page records. Can you please fix my code to explain?

  • Verified answer
    Suresh Kulla Profile Picture
    47,031 on at
    RE: cues having due date of items from Purchase Line table

    Remove the variable declaration in the OnOpenPage trigger.

  • Rupali  Profile Picture
    335 on at
    RE: cues having due date of items from Purchase Line table

    I didn't quite understand, if You could Please explain.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,031 on at
    RE: cues having due date of items from Purchase Line table

    You are applying a filter on a different record, you need to apply it on the Page Record, remove the variable declaration in the OnOpenPage

    pastedimage1611887792455v1.png

  • Rupali  Profile Picture
    335 on at
    RE: cues having due date of items from Purchase Line table

    Thanks, I removed that field, It is still not filtering the items having Promised Receipt date as Today and tomorrow,It shows all the items that are there in Purchase line Table without filtering anything ,Can you please help?

  • Verified answer
    Suresh Kulla Profile Picture
    47,031 on at
    RE: cues having due date of items from Purchase Line table

    You have defined New Date Filter has flow filter not as flow field and you can use CalcFields only on flow fields, there is a difference between flow filter and flow field.

    Please check below

    docs.microsoft.com/.../flowfilter-overview

  • Rupali  Profile Picture
    335 on at
    RE: cues having due date of items from Purchase Line table

    Thanks.

    I have my code below. It gives me  error  that "The New Date Filter field in the Purchase Cue table must be a FlowField".I have already described it as FlowFilter,Can you please help..

    tableextension 50129 PurchCue extends "Purchase cue"

    {

       fields

       {

           // Add changes to table fields here

           field(50121; "New Date Filter"; Date)

           {

               FieldClass = FlowFilter;

           }

           field(50120; PendingItems; Integer)

           {

               FieldClass = FlowField;

               CalcFormula = count("Purchase Line" where("Document Type" = filter(Order), "Type" = Const(item), "Promised Receipt Date" = FIELD( "New Date Filter")));

               Caption = 'Due Items';

           }

       }

    }

    pageextension 50130 PurchseOrdercuepage extends "Purchase Agent Activities"

    {

       layout

       {

           addbefore("Post Arrival Follow-up")

           {

               cuegroup(Itemdue)

               {

                   caption = 'ItemDue';

                   field("PendingItems"; PendingItems)

                   {

                       ApplicationArea = All;

                       Caption = 'Due Items';

                   }

               }

           }

       }

       // actions{}

       trigger OnOpenPage()

       var

           Rec: Record "Purchase cue";

       begin

           Rec.Reset();

           Rec.SetRange("New Date Filter", CALCDATE('<-CM>', TODAY), CALCDATE('<CM>', TODAY + 1));

           Rec.CalcFields("New Date Filter");

    }

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,321 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans