Determines whether the current code is running inside a cftransaction block. Returns true as soon as the block is entered, even before its first query runs.
isWithinTransaction()
→ returns boolean
Outside the transaction block the function returns false, inside it returns true.
writeOutput(isWithinTransaction());
transaction {
writeOutput(isWithinTransaction());
}
Expected Result: falsetrue
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.