RecordRef

RecordRef — a record identifier of the form appName/sourceId@localId, where / and @ are special delimiters.

It consists of three parts:

  • appName — the identifier of the application the record belongs to (e.g., system microservices emodel, eproc, or custom microservices);

  • sourceId — the identifier of the local (application-level) data source the record belongs to;

  • id — the local identifier, which must be unique within the source.

RecordRef is specified, for example, in the browser address bar when accessing an entity:

../../../_images/recordref.png

RecordRef is an implementation of the EntityRef interface.

RecordRef.create("emodel", "type", "testdl-counterpartyToAuthority");
  • emodel – appName

  • type – sourceId

  • testdl-counterpartyToAuthority — localId

Reference examples for users and groups

Entity type

Reference format

Example

User

emodel/person@{username}

emodel/person@ivan.petrov

Group

emodel/authority-group@{localId}

emodel/authority-group@accountant

Correct reference format

When writing values to ASSOC-like attributes (Association, Authority, Person, Group), it is important to use full references in the format {appName}/{sourceId}@{localId}.

The format of stored references can be verified via:

Records.get('emodel/your-type@doc-id').load('myAssocAtt[]?raw')