Hierarchy (view full)

Constructors

Accessors

Methods

AfterCreate AfterDelete AfterUpdate AllEntities ApplicationEntities_EntityIDArray ArrayFilterEncryptedFieldsForAPI ArrayMapFieldNamesToCodeNames AuditLogs_EntityIDArray BeforeCreate BeforeDelete BeforeUpdate CheckUserReadPermissions CompanyIntegrationRecordMaps_EntityIDArray CompanyIntegrationRunDetails_EntityIDArray Conversations_LinkedEntityIDArray CreateMJEntity CreateRecord DataContextItems_EntityIDArray DatasetItems_EntityIDArray DeleteMJEntity DeleteRecord DuplicateRuns_EntityIDArray EmitCloudEvent Entities_ParentIDArray EntityAIActions_EntityIDArray EntityActions_EntityIDArray EntityCommunicationMessageTypes_EntityIDArray EntityDocuments_EntityIDArray EntityFields_EntityIDArray EntityPermissions_EntityIDArray EntityRecordDocuments_EntityIDArray EntityRelationships_EntityIDArray EntitySettings_EntityIDArray FileEntityRecordLinks_EntityIDArray FilterEncryptedFieldsForAPI GeneratedCodes_LinkedEntityIDArray GetUserFromEmail GetUserFromPayload IntegrationURLFormats_EntityIDArray ListenForEntityMessages Lists_EntityIDArray MJEntity MJ_AccessControlRules_EntityIDArray MJ_RecordLinks_SourceEntityIDArray MJ_RecordLinks_TargetEntityIDArray MJ_TestRuns_TargetLogEntityIDArray MapFieldNamesToCodeNames QueryEntities_EntityIDArray QueryFields_SourceEntityIDArray RecommendationItems_DestinationEntityIDArray Recommendations_SourceEntityIDArray RecordChanges_EntityIDArray RecordMergeLogs_EntityIDArray ResourceTypes_EntityIDArray RunDynamicViewGeneric RunMJEntityDynamicView RunMJEntityViewByID RunMJEntityViewByName RunViewByIDGeneric RunViewByNameGeneric RunViewGenericInternal RunViewsGeneric RunViewsGenericInternal TaggedItems_EntityIDArray TemplateParams_EntityIDArray TestAndSetClientOldValuesToDBValues UpdateMJEntity UpdateRecord UserApplicationEntities_EntityIDArray UserFavorites_EntityIDArray UserRecordLogs_EntityIDArray UserViewCategories_EntityIDArray UserViews_EntityIDArray Users_LinkedEntityIDArray 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>