Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Custom Role Center Tile not showing the Correct Count

Posted on by 191
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
  • Suggested answer
    Kamal Khakhkhar Profile Picture
    Kamal Khakhkhar 299 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.

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans