Solved

Location of Enums in database

Posted on 2009-07-14
4
1,251 Views
Last Modified: 2012-05-07
Hi all,

In my Microsoft Dynamics AX application i record activities for staff. Each activity has an activity type which is an Enum (e.g. 0=Task, 1=Appointment etc.)

I am currently developing a report to upload to the Sql Server 2005 Reports server so the users can jump onto the website and see the report but the problem is that the database records the activity type as a numerical value. (records 1 instead of Appointment)

What i want to know is where do i look to find the "meaning" for the numerical value so i can display 'Appointment' instead of '1'
0
Comment
Question by:M3mph15
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
quale-kaizen earned 500 total points
ID: 24857552
For now (AX version 5) the metadata is not kept on the DB.

One option would be to create a static method in X++ to retrieve the label from the enum value.
You should be able to call X++ methods from your report.

Regards,
QK
static void Job1(Args _args)
{
    sysDictEnum sysDictEnum;
    int _enumValue = 1;  
    ;
 
 
    sysDictEnum = new sysDictEnum(enumnum(salesStatus));
 
    info(sysDictEnum.value2Label(_enumValue));
}

Open in new window

0
 
LVL 6

Author Comment

by:M3mph15
ID: 24865392
Ah ok. That sucks. How would I call X++ methods from my report?
0
 
LVL 7

Expert Comment

by:quale-kaizen
ID: 24867356
0
 
LVL 6

Author Closing Comment

by:M3mph15
ID: 31603568
I didn't get to the complete solution but my original question was where the Enums were stored.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question