---
schema_version: "1"
id: 788c9b80693d51212b32205813456a8544f8d52aa6fdcd6964b28d474ad5483b
title: Provide Visible No-Argument Constructors for Custom Apex Classes Used as Invocable Action Parameters
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/262-0-0/rn_apex_constructor_visibility_invocable_custom_classes_v66.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_constructor_visibility_invocable_custom_classes_v66.htm&release=262.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c0da9c8d4211d6102201652f5b78c1d18b61f4d1b1fd1a775e703c0854d31c84
description: Apex classes used for invocable action parameters must have a visible no-argument constructor. The constructor must be global for packaged classes invoked from outside the package. Use API version 65.0 or earlier with the release update disabled to maintain the previous behavior.
products:
  - Cross Cloud
release: "262"
---
# Provide Visible No-Argument Constructors for Custom Apex Classes Used as Invocable Action Parameters

Apex classes used for invocable action parameters must have a visible no-argument constructor. The constructor must be global for packaged classes invoked from outside the package. Use API version 65.0 or earlier with the release update disabled to maintain the previous behavior.

**Where:** This change applies to API version 66.0 and later. This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.

**Why:** The no-argument constructor instantiates your Apex classes when Apex code, REST API, or flows call invocable actions. Constructor visibility prevents instantiation failures and run-time errors. This change was originally introduced as the “Enforcing No-Argument Constructor” release update, which is no longer enforced. If you haven't enabled that release update, this versioned change implements the requirement.

**How:** Provide a global no-argument constructor with appropriate visibility for your custom Apex classes used as invocable action parameters inside the package. Use the default constructor or explicitly define your own.

If your class has no explicit constructors, Apex provides an implicit no-argument constructor with the same access level as the class:

```
global class MyInvocableClass {
    @InvocableVariable(required=true)
    global String accountName;
    
    @InvocableVariable
    global Integer priority;
    
    // No explicit constructor - Apex provides an implicit global no-argument constructor
}
```

When you add a constructor with parameters, Apex no longer provides the implicit no-argument constructor. Apex requires that you add a no-argument constructor with appropriate visibility:

```
global class MyInvocableClass {
    @InvocableVariable(required=true)
    global String accountName;
    
    @InvocableVariable
    global Integer priority;
    
    // Constructor with parameters
    global MyInvocableClass(String accountName, Integer priority) {
        this.accountName = accountName;
        this.priority = priority;
    }
    
    // Explicit no-argument constructor now required
    global MyInvocableClass() {
    }
}
```

#### See Also

- [Enforcing No-Argument Constructor on Apex Classes Used for Invocable Action Parameters (Release Update)](https://help.salesforce.com/s/articleView?id=release-notes.rn_automate_flow_release_update_enforce_perm_requirements_on_built_in_apex_classes.htm&release=262.0.0&type=5 "When this update is enabled, you get access to certain built-in Apex classes that are available to be used as invocable action parameters. Additionally, this update enforces the visibility of the no-argument constructor on any class. This update was scheduled to be enforced in Summer ’26. Starting in Spring ’26, Salesforce no longer enforces this update, but we recommend that you enable it. This release update was previously named Enforce Permission Requirements Defined on Built-In Apex Classes Used as Inputs.")
- [_Apex Developer Guide_: InvocableVariable Annotation](https://developer.salesforce.com/docs/atlas.en-us.262.0.apexcode.meta/apexcode/apex_classes_annotation_InvocableVariable.htm)