Hierarchy (view full)

Constructors

Accessors

Methods

AIAgentNotes_UserIDArray AIAgentRequests_RequestForUserIDArray AIAgentRequests_ResponseByUserIDArray AIAgents_OwnerUserIDArray ActionExecutionLogs_UserIDArray Actions_CodeApprovedByUserIDArray AfterCreate AfterDelete AfterUpdate AllUsers ArrayFilterEncryptedFieldsForAPI ArrayMapFieldNamesToCodeNames AuditLogs_UserIDArray BeforeCreate BeforeDelete BeforeUpdate CheckUserReadPermissions CommunicationRuns_UserIDArray CompanyIntegrationRuns_RunByUserIDArray ConversationDetails_UserIDArray Conversations_UserIDArray CreateMJUser CreateRecord DashboardCategories_UserIDArray Dashboards_UserIDArray DataContexts_UserIDArray DeleteMJUser DeleteRecord DuplicateRuns_StartedByUserIDArray EmitCloudEvent FilterEncryptedFieldsForAPI GetUserFromEmail GetUserFromPayload ListCategories_UserIDArray ListenForEntityMessages Lists_UserIDArray MJUser MJ_AIAgentExamples_UserIDArray MJ_AIAgentPermissions_UserIDArray MJ_AIAgentRuns_UserIDArray MJ_AccessControlRules_GrantedByUserIDArray MJ_ArtifactPermissions_SharedByUserIDArray MJ_ArtifactPermissions_UserIDArray MJ_ArtifactUses_UserIDArray MJ_ArtifactVersions_UserIDArray MJ_Artifacts_UserIDArray MJ_CollectionPermissions_SharedByUserIDArray MJ_CollectionPermissions_UserIDArray MJ_Collections_OwnerIDArray MJ_ConversationDetailRatings_UserIDArray MJ_DashboardUserPreferences_UserIDArray MJ_DashboardUserStates_UserIDArray MJ_PublicLinks_UserIDArray MJ_ReportUserStates_UserIDArray MJ_ScheduledJobRuns_ExecutedByUserIDArray MJ_ScheduledJobs_NotifyUserIDArray MJ_ScheduledJobs_OwnerUserIDArray MJ_Tasks_UserIDArray MJ_TestRunFeedbacks_ReviewerUserIDArray MJ_TestRuns_RunByUserIDArray MJ_TestSuiteRuns_RunByUserIDArray MJ_UserSettings_UserIDArray MapFieldNamesToCodeNames QueryCategories_UserIDArray RecommendationRuns_RunByUserIDArray RecordChangeReplayRuns_UserIDArray RecordChanges_UserIDArray RecordMergeLogs_InitiatedByUserIDArray ReportCategories_UserIDArray ReportSnapshots_UserIDArray Reports_UserIDArray ResourceLinks_UserIDArray ResourcePermissions_UserIDArray RunDynamicViewGeneric RunMJUserDynamicView RunMJUserViewByID RunMJUserViewByName RunViewByIDGeneric RunViewByNameGeneric RunViewGenericInternal RunViewsGeneric RunViewsGenericInternal ScheduledActions_CreatedByUserIDArray TemplateCategories_UserIDArray Templates_UserIDArray TestAndSetClientOldValuesToDBValues UpdateMJUser UpdateRecord UserApplications_UserIDArray UserFavorites_UserIDArray UserNotifications_UserIDArray UserRecordLogs_UserIDArray UserRoles_UserIDArray UserViewCategories_UserIDArray UserViewRuns_RunByUserIDArray UserViews_UserIDArray Workspaces_UserIDArray createAuditLogRecord createRecordAccessAuditLogRecord findBy getRowLevelSecurityWhereClause packageSPParam safeFirstArrayElement

Constructors

Accessors

Methods

  • Filters encrypted field values before sending to the API client.

    For each encrypted field in the entity:

    • If AllowDecryptInAPI is true: value passes through unchanged (already decrypted by data provider)
    • If AllowDecryptInAPI is false and SendEncryptedValue is true: re-encrypt and send ciphertext
    • If AllowDecryptInAPI is false and SendEncryptedValue is false: replace with sentinel value

    Parameters

    • entityName: string

      Name of the entity

    • dataObject: Record<string, unknown>

      The data object containing field values

    • contextUser: UserInfo

      User context for encryption operations

    Returns Promise<Record<string, unknown>>

    The filtered data object

  • Maps field names to their GraphQL-safe CodeNames and handles encryption for API responses.

    For encrypted fields coming from raw SQL queries (not entity objects):

    • AllowDecryptInAPI=true: Decrypt the value before sending to client
    • AllowDecryptInAPI=false + SendEncryptedValue=true: Keep encrypted ciphertext
    • AllowDecryptInAPI=false + SendEncryptedValue=false: Replace with sentinel

    Parameters

    • entityName: string

      The entity name

    • dataObject: any

      The data object with field values

    • Optional contextUser: UserInfo

      Optional user context for decryption (required for encrypted fields)

    Returns Promise<any>

    The processed data object

  • Optimized RunViewGenericInternal implementation with:

    • Field filtering at source (Fix #7)
    • Improved error handling (Fix #9)

    Parameters

    • provider: DatabaseProviderBase
    • viewInfo: UserViewEntityExtended
    • extraFilter: string
    • orderBy: string
    • userSearchString: string
    • excludeUserViewRunID: string
    • overrideExcludeFilter: string
    • saveViewResults: boolean
    • fields: string[]
    • ignoreMaxRows: boolean
    • excludeDataFromAllPriorViewRuns: boolean
    • forceAuditLog: boolean
    • auditLogDescription: string
    • resultType: string
    • userPayload: UserPayload
    • maxRows: number
    • startRow: number

    Returns Promise<RunViewResult<any>>

  • This routine compares the OldValues property in the input object to the values in the DB that we just loaded. If there are differences, we need to check to see if the client is trying to update any of those fields (e.g. overlap). If there is overlap, we throw an error. If there is no overlap, we can proceed with the update even if the DB Values and the ClientOldValues are not 100% the same, so long as there is no overlap in the specific FIELDS that are different.

    ASSUMES: input object has an OldValues___ property that is an array of Key/Value pairs that represent the old values of the record that the client is trying to update.

    Parameters

    Returns Promise<void>