Class for running views in a generic, tier-independent manner - uses a provider model for implementation transparently from the viewpoint of the consumer of the class. By default the RunView class you create will connect to the DEFAULT provider. If you want your RunView to connect to a different provider, you can pass in the provider to the constructor.

Constructors

Properties

_provider: IRunViewProvider = null
_globalProviderKey: string = 'MJ_RunViewProvider'

Accessors

  • get ProviderToUse(): IRunViewProvider
  • This property is used to get the IRunViewProvider implementation that is used by this instance of the RunView class. If a provider was specified to the constructor, that provider is used, otherwise the static RunView.Provider property is used.

    Returns IRunViewProvider

Methods

  • Runs a view based on the provided parameters, see documentation for RunViewParams for more

    Type Parameters

    • T = any

    Parameters

    • params: RunViewParams
    • Optional contextUser: UserInfo

      if provided, this user is used for permissions and logging. For server based calls, this is generally required because there is no "Current User" since this object is shared across all requests.

    Returns Promise<RunViewResult<T>>

  • Utility method that calculates the entity name for a given RunViewParams object by looking at the EntityName property as well as the ViewID/ViewName/ViewEntity properties as needed.

    Parameters

    Returns Promise<string>