---
id: object/codeunit/9701
type: object
title: Codeunit 9701 "Cues And KPIs"
summary: Codeunit 9701 "Cues And KPIs" in System Application (System.Visualization). 6 public procedures, 2 events. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 58d0c823e79377dfa286ec2b300897d0cfab6b0d8cccc96e68e3588063593cc2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Cues%20and%20KPIs/src/CuesAndKPIs.Codeunit.al
    title: src/System Application/App/Cues and KPIs/src/CuesAndKPIs.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 9701
name: Cues And KPIs
namespace: System.Visualization
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 8
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 8
  implements: 0
---

# Codeunit 9701 "Cues And KPIs"

> Codeunit 9701 "Cues And KPIs" in System Application (System.Visualization). 6 public procedures, 2 events. Present since at least BC23, still in BC30.

System Application · System.Visualization · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Cues%20and%20KPIs/src/CuesAndKPIs.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |
| SingleInstance | true |

## Events published

- `OnConvertStyleToStyleText(CueStyle: Enum "Cues And KPIs Style"; var Result: Text; var Resolved: Boolean)` (integration): Event that is called to convert from the style enum to a text value in case of extended enum values. Subscribe to this event if you want to introduce new cue styles.
- `OnBeforeGetCustomizedCueStyleOption(TableID: Integer; FieldNo: Integer; CueValue: Decimal; var CueStyle: Enum "Cues And KPIs Style"; var Resolved: Boolean)` (integration): Event that allows definition of cue style for a cue using style enum without the usage of a cue setup table. Subscribe to this event if you want to define a cue style for a cue using custom prerequisites.

## Procedures

- `OpenCustomizePageForCurrentUser(TableId: Integer)`: Opens the cue setup user page with an implicit filter on table id. The page shows previously added entries in the Cue Setup Administration page that have the UserId being either the current user or blank. The page also displays all other fields the that the passed table might have of type decimal or...
- `ChangeUserForSetupEntry(var RecordRef: RecordRef; Company: Text[30]; UserName: Text[50])`: Changes the user of a cue setup entry. A Recref pointing to the newly modified record is returned by var.
- `SetCueStyle(TableID: Integer; FieldID: Integer; Amount: Decimal; var FinalStyle: Enum "Cues And KPIs Style")`: Retrieves a Cues And KPIs Style enum based on the cue setup of the provided TableId, FieldID and Amount. The computed cue style is returned by var.
- `PersonalizedCueSetupExistsForCurrentUser(TableID: Integer; FieldID: Integer): Boolean`: Checks if a personalized Cue Setup record exists for the current user. The ID of the table containing the field for which the style is wanted. The ID of the field for which the style is wanted.
- `ConvertStyleToStyleText(CueStyle: Enum "Cues And KPIs Style"): Text`: Converts a Cues And KPIs Style enum to a style text. Enum values 0,7,8,9,10 are defined by default, if custom values are needed take a look at OnConvertStyleToStyleText event.
- `InsertData(TableID: Integer; FieldNo: Integer; LowRangeStyle: Enum "Cues And KPIs Style"; Threshold1: Decimal; MiddleRangeStyle: Enum "Cues And KPIs Style"; Threshold2: Decimal; HighRangeStyle: Enum "Cues And KPIs Style"): Boolean`: Inserts cue setup data. The entries inserted via this method will have no value for the userid field.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 9702 "Cues And KPIs Impl."](../codeunit/9702.md) (6 calls: `ChangeUserForSetupEntry → ChangeUserForSetupEntry`, `ConvertStyleToStyleText → ConvertStyleToStyleText`, `InsertData → InsertData`, …)

## Called by

- [Codeunit 5549 "Create Cue Setup"](../codeunit/5549.md) (4 calls: `CreateActivitiesCue → InsertData`, `CreateFinanceCue → InsertData`, `CreateRelationshipManagementCue → InsertData`, …)
- [Page 9102 "Job Queue Tasks Activities"](../page/9102.md) (4 calls: `OnOpenPage → InsertData`, `OnOpenPage → PersonalizedCueSetupExistsForCurrentUser`, `UpdateJobQueueCountAndStyleExpr → ConvertStyleToStyleText`, …)
- [Codeunit 4006 "Hybrid Cue Setup Management"](../codeunit/4006.md) (2 calls: `GetReplicationSuccessRateCueStyle → SetCueStyle`, `InsertDataForReplicationSuccessRateCue → InsertData`)
- [Codeunit 9702 "Cues And KPIs Impl."](../codeunit/9702.md) (2 calls: `ConvertStyleToStyleText → OnConvertStyleToStyleText`, `GetCustomizedCueStyleOption → OnBeforeGetCustomizedCueStyleOption`)
- [Codeunit 418 "User Management"](../codeunit/418.md) (1 call: `RenameRecordWithMultipleKeys → ChangeUserForSetupEntry`)
- [Page 1314 "AccountantPortal Activity Cues"](../page/1314.md) (1 call: `SetAccountantPortalAmountFields → SetCueStyle`)
- [Page 1315 "Accountant Portal Finance Cues"](../page/1315.md) (1 call: `SetAccountantPortalFields → SetCueStyle`)
- [Page 1318 "Account Receivables KPIs"](../page/1318.md) (1 call: `OnOpenPage → SetCueStyle`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Cues And KPIs")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
