Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Custom Role Center Tile not showing the Correct Count

Posted on by 164
I have this tile that is supposed to show inventory picks that have a shipment date of today.  The tile shows the wrong number, but when the tile is clicked to go the the list, the list correctly displays them.  All of the other tiles show the correct counts.  I'm at a loss as to what is wrong. 
 
My code:

 
 
The tile in question:
 
The list, clearly showing more than 3:
 
Any ideas? Thank you
Categories:
  • Suggested answer
    Kamal Khakhkhar Profile Picture
    Kamal Khakhkhar 259 on at
    Custom Role Center Tile not showing the Correct Count
    Hii There.
    As per your question you need to add below code in Table & Page as per requirement.
     
    For page..
    trigger OnOpenPage()
       begin
           Rec.Reset();
           if not Rec.Get() then begin
               Rec.Init();
               Rec.Insert();
           end;
     
    Rec.SetRange("Date Filter", 0D, WorkDate());
           Rec.SetRange("Date Filter2", WorkDate(), WorkDate());
           Rec.SetRange("User ID Filter", UserId());
       end;
     
    ---
     
    For Table.
    field(2; "Invt Pick Today"; Integer)
           {
               AccessByPermission = TableData "Warehouse Activity Header" = R;
               CalcFormula = count("Warehouse Activity Header" where(Type = filter("Invt. Pick"),"Shipment Date" = field("Date Filter")
                                                   );
               Caption = 'Invt Pick Today';
               Editable = false;
               FieldClass = FlowField;
           }
     
    - -
     
    as per your page not getting any filter of 'Today' string.
     
    Try as per this.
     
    Thank You.
    Kamal Khakhkhar.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans