web
You’re offline. This is a read only version of the page.
close
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...
Suggested Answer

Daily Sales Cue

(1) ShareShare
ReportReport
Posted on by 822
Hello,
 
how can i add to my role center, a Daily Sales cue similar to Sales This Month Cue: It should read sales invoices and sales credit memo Amount including VAT filtered by today date (from Customer Ledger Entries)
 
Regards,
David
I have the same question (0)
  • Suggested answer
    Gerardo Rentería García Profile Picture
    25,213 Most Valuable Professional on at
  • David Tailor Profile Picture
    822 on at
    Thanks  Gdrenteria,
     
    i need help with the code if possible.
     
    Regards,
    David
  • Netjacker2097 Profile Picture
    286 on at
    Hi David,
     
    if it just informative, i would just do the following as a query and use the code unit to do it.
     
     
    query 57001 TodaysInvoices
    {
        Caption = 'TodaysInvoices';
        QueryType = Normal;
     
        elements
        {
            dataitem(Cust__Ledger_Entry; "Cust. Ledger Entry")
            {
                DataItemTableFilter = "Posting Date" = filter('t');
     
                Column(Amount__LCY_; "Amount (LCY)")
                {
                   
                }
            }
        }
    }
     
    codeunit 57001 CalculateTotalInvoices
    {
        procedure GetTotalInvoicesToday(): Decimal
        var
            InvoiceQuery: Query TodaysInvoices;
            TotalAmount: Decimal;
        begin
            TotalAmount := 0;
            InvoiceQuery.Open;
            while InvoiceQuery.Read() do begin
                TotalAmount += InvoiceQuery.Amount__LCY_;
            end;
            InvoiceQuery.Close;
            exit(TotalAmount);
        end;
    }
     
    Extend the role centre
     
    pageextension 57001 BAManagerCueExt extends "O365 Activities"
    {
        layout
        {
            addbefore("Ongoing Sales")
            {
                cuegroup(Daily)
                {
                    CuegroupLayout = Wide;
                    field(TotalInvoicesToday; TotalInvoicesToday)
                    {
                        ApplicationArea = All;
                        Caption = 'Invoices Amount Today';
                        Editable = false;
                        AutoFormatType = 1;
                        AutoFormatExpression = 'Currency';
                    }
                 }
             }
          }
       VAR
            TotalInvoicesToday: Decimal;
            InvoiceCalculator: Codeunit CalculateTotalInvoices;
     
        local procedure UpdateTotalInvoicesToday()
        begin
            TotalInvoicesToday := InvoiceCalculator.GetTotalInvoicesToday();
        end;
     
        trigger OnOpenPage();
        begin
            UpdateTotalInvoicesToday();
        end;
     
        trigger OnAfterGetCurrRecord();
        begin
            UpdateTotalInvoicesToday();
        end;
     
  • David Tailor Profile Picture
    822 on at
    thank you  Netjacker2097,
     
    how can i add drill down on amount? is it hard?
     
    Regards,
    David
     
     
  • Netjacker2097 Profile Picture
    286 on at
    Hi David,
     
    you would have to do it in a different way if you want to be able to drill down.
     
    you would have to extend the Activities cue in rolse centre and do a flow field.
     
            field(87040; MyTestfield; Integer)
            {
                FieldClass = FlowField;
                CalcFormula = sum("Cust. Ledger Entry"."Amount (LCY)" where("Posting Date" = filter('t')));
                Caption = 'Test Field';
            }
     
    you will need to extend the rolecentre area where you like to place this.
     
                cuegroup(Daily)
                {
                    field(MyTestfield; rec.MyTestfield)
                    {
                        Caption = 'Daily Sales Amont LCY';
                        ApplicationArea = all;
                        DrillDownPageId = 25;
                    }
                }
     
    Thanks,
    M
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans