One way of doing it is:
int i;
i = LedgerAccountType::AccountRevenue;
print i;
This gives you the enum value. Is that what you are looking for ?
/Stefan
-----Ursprungligt meddelande-----
Fran: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] Mike Savage
Skickat: den 24 april 2006 13:52
Till: development-axapta@yahoogroups.com
Amne: RE: [development-axapta] ENUM Element
Thanks Yavuz
I was thinking more of how do I do it from within a class, for example.
In the class I would have LedgerAccountType::AccountRevenue, but how,
from there, do I determine the element id via a function?
Cheers
Mike Savage
Sense Enterprise Solutions Ltd
-----Original Message-----
From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Yavuz YILDIZ
Sent: 24 April 2006 12:25
To: development-axapta@yahoogroups.com
Subject: Re: [development-axapta] ENUM Element
Login to Axapta as Administrator and open AOT. Select Data
Dictionary\Base Enums. You can
see that enum values.
--- Mike Savage <[EMAIL PROTECTED]> wrote:
> Hi.
>
>
>
> How do I determine which element of an enum an enum element is in
code?!
>
>
>
> I.e. LedgerAccountType::AccountRevenue = ??
>
>
>
>
>
> Enum2Value seems to return the string not the element id!!
>
>
>
>
>
> Cheers
>
>
>
>
>
>
>
> Mike Savage
> Sense Enterprise Solutions Ltd
>
>
>
>
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
Yavuz YILDIZ
ERP Developer
Star Group Glass Processing
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! Groups Links
Yahoo! Groups Links
SPONSORED LINKS
Computer part | Programming languages | Microsoft axapta |
Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.