insert MethodStatic


insert(txn, parentSubjectId, name, description?) @beta

Insert a Subject

insert(txn: EditTxn, parentSubjectId: string, name: string, description?: string): string

@returns The Id of the newly inserted Subject *

@throws IModelError if there is a problem inserting the Subject *

Parameter Type Description
txn EditTxn The EditTxn to use
*
parentSubjectId string The new Subject will be inserted as a child of this Subject
*
name string The name (codeValue) of the Subject
*
description string The optional description of the Subject
*

Returns - string

The Id of the newly inserted Subject *



insert(iModelDb, parentSubjectId, name, description?)

Deprecated  in 5.1.9 - will not be removed until after 2026-08-04. Use Subject.insert(txn, ...) instead.

Insert a Subject

insert(iModelDb: IModelDb, parentSubjectId: string, name: string, description?: string): string

Parameter Type Description
iModelDb IModelDb  
parentSubjectId string  
name string  
description string  

Returns - string


Defined in

Last Updated: 05 May, 2026