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

Cue Customization based on User ID

(1) ShareShare
ReportReport
Posted on by 76
Hi,
 I have a requirement to customize "Sales This Month" Cue based on current user like in sales this month cue the value should show only the sales transaction done by the current user.
 
I wrote a code like below:
field(5; SalesThisMonthCue; Decimal)
        {
            Caption = 'Sales This Month Cue';
            FieldClass = FlowField;
            CalcFormula = sum("Cust. Ledger Entry"."Sales (LCY)" where("Document Type" = filter(Invoice), "Posting Date" = filter('-CM' .. 'CD'), "User ID" = field(UserName)));
        }
 
Even I tried the code with "systemcreatedby" filtering also. But still getting the value as like in the "sales this month" cue for all posted sales transaction. How to filter the value based on current user ID.
I have the same question (0)
  • Vahid Ghafarpour Profile Picture
    12,090 Super User 2025 Season 2 on at
    Did you try
    "User ID" = const(USERID)
  • Suggested answer
    Valentin Castravet Profile Picture
    31,340 Super User 2025 Season 2 on at
  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at
    Hi, It looks like you need to use User Security Id (SID)
    More details:
    Dynamics 365 Business Central: User Security Id (SID) and User Id (Name)
     
    Hope this helps.
    Thanks
    ZHU

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