Service for tracking and retrieving recently accessed resources. Uses the User Record Logs entity to persist access history.

Constructors

Properties

_isLoaded: any
_isLoading$: any
_recentItems$: any
determineResourceType: any

Determines the resource type based on entity name

_instance: any
ɵfac: unknown
ɵprov: ɵɵInjectableDeclaration<RecentAccessService>

Accessors

  • get IsLoading(): Observable<boolean>
  • Observable loading state

    Returns Observable<boolean>

  • get RecentItems(): Observable<RecentAccessItem[]>
  • Observable of recent access items, sorted by most recent first

    Returns Observable<RecentAccessItem[]>

  • get RecentItemsValue(): RecentAccessItem[]
  • Current value of recent items

    Returns RecentAccessItem[]

Methods

  • Clears the cached recent items (useful for logout)

    Returns void

  • Loads recent access items for the current user using UserInfoEngine (cached).

    Parameters

    • Optional maxItems: number

      Maximum number of items to return (default 15)

    • Optional forceRefresh: boolean

      Force refresh even if already loaded

    Returns Promise<RecentAccessItem[]>

  • Logs access to a record. Creates or updates the User Record Log entry. This is a fire-and-forget operation - errors are logged but don't interrupt the user.

    Parameters

    • entityName: string

      The name of the entity being accessed

    • recordId: string | CompositeKey

      The record ID (single value or CompositeKey string)

    • Optional resourceType: "record" | "report" | "view" | "dashboard" | "artifact"

      The type of resource being accessed

    Returns Promise<void>

  • Refresh recent items in background

    Returns Promise<void>