(Quick Reference)

exists

Purpose

Checks whether an instance exists for the specified id

Examples

def accountId = …
if (Account.exists(accountId)) {
    // do something
}

Description

Parameters:

  • id - The id of the object