Member Junction
    Preparing search index...

    Replaces or removes a previously-added section in an in-progress document. Section IDs are returned by Add Document Content and Preview Document.

    Parameters:

    • Handle (required): the document handle
    • SectionID (required): the section to modify
    • Action (required): 'replace' or 'remove'
    • Operations (required if Action='replace', JSON array): replacement operations

    Output:

    • success, updated section count

    Hierarchy

    • BaseFileHandlerAction
      • ModifyDocumentSectionAction
    Index

    Constructors

    Methods

    • Get file content from various sources based on parameters Priority: FileID > FileURL > Data parameter

      Parameters

      • params: RunActionParams

        Action parameters

      • dataParamName: string

        Name of the parameter containing direct data

      • fileParamName: string = 'FileID'

        Name of the parameter containing file ID (default: 'FileID')

      • urlParamName: string = 'FileURL'

        Name of the parameter containing file URL (default: 'FileURL')

      Returns Promise<
          {
              content: string
              | Buffer;
              fileName?: string;
              mimeType?: string;
              source: "url" | "storage" | "direct";
          },
      >

      Object with content and metadata

    • Executes the action with the provided parameters.

      Parameters

      Returns Promise<ActionResultSimple>

      Promise resolving to the action result

    • Save file to MJ Storage. Uploads the content to a FileStorageAccount and creates the corresponding MJ: Files entity record.

      Parameters

      • content: string | Buffer

        File content as string or Buffer

      • fileName: string

        Name for the file

      • mimeType: string

        MIME type of the file

      • params: RunActionParams

        Action parameters (for contextUser)

      • OptionalstorageAccountName: string

        Optional: name of the storage account to use (falls back to first active)

      • OptionalstoragePath: string

        Optional: custom storage path prefix (falls back to artifacts/{date}/{uuid}/)

      Returns Promise<string>

      The ID of the newly created MJ: Files record