Thanx - itīs a much more better solution as mine!
Great Group here !!!
Ben
________________________________
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 4. November 2004 16:39
An: [EMAIL PROTECTED]
Betreff: Re: [development-axapta] Re: LabelId's from Enum Values
Hi Ben,
you get the result correct, but you change the language temporay for the session.
I have solved the problem in the following manner:
add this method to the class "SysDictEnum":
LabelId Value2LabelLabel(int value)
{
#Properties
SysDictEnum SysDictEnum;
TreeNode treeNode;
;
return findProperty(this.treeNode().AOTfindChild(this.value2Symbol(value)).AOTgetProperties(),#PropertyLabel);
}
You can test it with this job:
static void Job2(Args _args)
{
sysDictEnum sysDictEnum = new SysDictEnum(EnumNum(LedgerAccountType));
LabelId labelId;
;
LabelId = sysDictEnum.Value2LabelLabel(LedgerAccountType::AccountCost);
info(labelId);
info(SysLabel::labelId2String2(labelId, 'en-us'));
info(SysLabel::labelId2String2(labelId, 'nl'));
info(SysLabel::labelId2String2(labelId, 'fr'));
}
yf
/Jesper
-------- Original Message --------
Subject: [development-axapta] Re: LabelId's from Enum Values (04-Nov-2004 15:12)
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
>
>
>
> original i want to get the labelid in format @SYSxxxx to translate it
> into an other language.
>
> with
>
> LanguageId orglanguageId = infolog.language();
> senum = new SysDictEnum( 53 );
> infolog.language('en-us');
> lid = senum.value2Label(1);
> infolog.language(orglanguageId);
>
> i get the labeltext in the correct language without using the labelid.
>
> But thanx for support :-)
> Ben
>
> --- In [EMAIL PROTECTED], "onnobid" <[EMAIL PROTECTED]>
> wrote:
> >
> > ???
> >
> > in previous post you asked for label id in format @SYSxxx.
> > Value2Label() returns the label but not the id of the label. What do
> > you really mean now?
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
> To: [EMAIL PROTECTED]
Yahoo! Groups Sponsor
ADVERTISEMENT
click here <http://us.ard.yahoo.com/SIG=129788bj5/M=315388.5543473.6613715.3001176/D=groups/S=1705006764:HM/EXP=1099674707/A=2372354/R=0/SIG=12id813k2/*https:/www.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS>
<http://us.adserver.yahoo.com/l?M=315388.5543473.6613715.3001176/D=groups/S=:HM/A=2372354/rand=245339959>
________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.