Plaza 365
Plaza 365

No results found for your search

RegisterLog in

5

Visit article

Dynamics 365 ERP - Development

Category

May 1, 2024

Published date

Text

Article Type


AI Summary

  • The article discusses how to export the label enum value of the field DocumentState from the PurchTable table in Dynamics 365 for Operations.
  • The first step is to create a data source of type Enumeration under the Dynamics 365 for Operations in the model mapping.
  • The base enum "VersioningDocumentState" is added, which allows the function LISTOFFIELDS to create a calculated field based on it.
  • The calculated field is a record list with the different enum elements as rows, and it is created using the expression LISTOFFIELDS(VersioningDocumentState).
  • A nested CalculatedField called $DocumentStateList is created under the base enum, and its formula is set to GETENUMVALUEBYNAME(VersioningDocumentState,@.Name).
  • The list with the different enum elements, including the value, can now be bound to the model string node using the where function to filter the value in the table.
  • The formula for the binding is FIRSTORNULL(WHERE('$DocumentStateList', '$DocumentStateList'.'$EnumValue' = @.DocumentState)).Label.
  • The article concludes by mentioning that binding Enum fields can be more complex than expected, but once the process is understood, it becomes straightforward. The author also invites readers to share any better solutions they may have.

Registered users can view the full text for FREE!

Sign In Now!