Whatever message this page gives is out now! Go check it out!

IsCustomFunction

Last update:
May 18, 2026

Description

Determines whether a name represents a custom function.

Returns

True, if name can be called as a custom function; False, otherwise.

Category

Function syntax

IsCustomFunction(name)

Parameters

Parameter
Description
name
Name of a custom function. Must not be in quotation marks. If not a defined variable or function name, ColdFusion generates an error.

Usage

The IsCustomFunction function returns True for any function that can be called as a custom function, including functions defined using CFScript function declarations, CFScript function expressions, cffunction tags, and functions that are ColdFusion component methods. For CFC methods, first instantiate the component.
Note:  To prevent undefined variable exceptions, always precede IsCustomFunction with an IsDefined test, as shown in the example.
For functions defined using function expressions, use isClosure().

Example

 
<cfscript> 
    // CustomFunction 
    function2 = function (sum) {}; 
    writeoutput("Is it a customFunction: " & isCustomFunction(function2)); 
</cfscript>
Output
Is it a customFunction: YES

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page