Skip to main content
Version: 1.1.0

dataverseEntitySetName

@spartanfx/react v1.1.0


@spartanfx/react / codeapps / dataverseEntitySetName

Function: dataverseEntitySetName()

function dataverseEntitySetName(logicalName): string;

Derive a Dataverse entity set (collection) name from a table's logical name, mirroring the platform's default EntitySetName pluralization. Used to build <nav>@odata.bind paths when only the referenced table's logical name is known (from a lookup's ManyToOneRelationships[].ReferencedEntity).

Rules (the documented Dataverse defaults):

  • consonant + y…ies (opportunityopportunities)
  • s|x|z|ch|sh…es (customeraddresscustomeraddresses)
  • otherwise → …s (systemusersystemusers, accountaccounts)

Irregular plurals are rare for Dataverse tables; pass an explicit entity-set override at the call site when one is hit.

Parameters

logicalName

string

Returns

string