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
    Meli 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
    Rupali 335 on at
    RE: cues having due date of items from Purchase Line table

    Its Done.Thanks.

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

    Send me the new code

  • Rupali  Profile Picture
    Rupali 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
    Suresh Kulla 44,614 on at
    RE: cues having due date of items from Purchase Line table

    Remove the variable declaration in the OnOpenPage trigger.

  • Rupali  Profile Picture
    Rupali 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
    Suresh Kulla 44,614 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
    Rupali 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
    Suresh Kulla 44,614 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
    Rupali 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans