getEntityRef
Retrieves the EntityRef object associated with the specified entity instance. The EntityRef provides methods for performing operations on the entity instance.
returns:
The EntityRef object associated with the specified entity instance.
throws:
If throwException is true and the EntityRef object cannot be retrieved.
see:
Arguments:
- entity - The entity instance.
- throwException - Indicates whether to throw an exception if the EntityRef object cannot be retrieved.