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.