OBJECT_NAME

Description

Returns the object API name for the given record ID in the current org.

Syntax

OBJECT_NAME(id_value) -> String

Parameters

ParameterData TypeRequiredDescription
id_valueIDYesThe record ID to get the object API name for.

Examples

OBJECT_NAME("001XXXXXXXXXXXXXXX")
-- Returns "Account".
OBJECT_NAME(WhatId)
-- Returns the object API name of the related record.