Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

enum2Symbol obsolete

Posted on by 360

Hi all,

with the new version of d365fo(10.0.6 pu30) the compiler tell me that the global function enum2symbol is now obsolete and harmful.

which method could i use instead of enum2symbol?

i need to return the name of the enum element.

Thanks.

Nino

  • Suggested answer
    PaulNoakes Profile Picture
    PaulNoakes 27 on at
    RE: enum2Symbol obsolete

    The compilation warning goes away by wrapping the enum value with an explicit cast to int:

    str sym = enum2Symbol(enumNum(YourEnumHere), enum2int(yourEnumValueHere));

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: enum2Symbol obsolete

    I don't have a PU30 system at hand. But in general in these cases you can check how the standard system is handling these requirements now. So you can use Find references in a pre-PU30 system and see which standard classes use enum2symbol. And then check in PU30 if they have been changed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans