FlowKMFEncrypter in a Flow Action

  • Release version: Australia
  • Updated June 22, 2026
  • 1 minute to read
  • Resolve the "undefined is not a function" error that occurs when a Flow Action calls the FlowKMFEncrypter API, by allowing the operation in the Restricted Caller Access Privilege record.

    Before you begin

    Role required: admin and security_admin

    About this task

    When you use FlowKMFEncrypter in a Flow Action, the action might fail with the following error:

    Error: undefined is not a function., Detail: undefined is not a function

    This error occurs because the Restricted Caller Access Privilege record is not permitted. To resolve the error, locate or create the Restricted Caller Access Privilege record using Workflow Studio for the Flow Action and set its status to allowed.

    Procedure

    1. Create or locate the auto-created Restricted Caller Access Privilege record with the following values:
      Field Value
      Source Scope Global
      Source Type Flow Action
      Source Name of Flow Action
      Target Script Include: FlowKMFEncrypter
      Operation Execute API
    2. Change Status from Requested to Allowed.
    3. Retest the action.

    Result

    The Flow Action runs without the error, and the FlowKMFEncrypter operation is permitted.

    What to do next

    Note:
    If the Flow Action is updated later, the Restricted Caller Access Privilege status changes to Invalidated. Update it back to Allowed.