November 01, 2012

How to get the current database name in axapta

How to get the current database name in axapta

Here is a small trick to know the name of current data base in axapta.
Axapta supports a class called SysSqlSystemInfo by using this class we can get the current database name...
To do this just create a new job and write following code or you can copy paste from here also.


static void sqlSysName(Args _args)
{
    ;
    info(SysSQLSystemInfo::construct().getloginDatabase());
}

- Harry

October 20, 2012

Document Handling in Microsoft Dynamics AX

Document Handling in Microsoft Dynamics AX 2009 and 2012





Document Handling is very useful to attach files related to AX data to forms. It’s possible to add data at any form. It is also useful to attache any reference document to any record in Form.
To use Document Handling you have to activate it by follow these steps...

To activate this feature follow the next steps:


1. Go to BasicSetupDocument management:


image
image
2. Setup Parameters:

image

Active directory is the default path where allocate the files to attach.
Check Use Active document tables has to be activated.


image

Number sequence to numerate the attachments.
3. Define Document types:

image

For each type it’s necessary define the location folder:

image

4. Select in which forms it’s possible to attach documents in Active document tables:

image


5. Now, we can attach documents in the above forms. For example in Employees form:

image
image


For this example, we are going to attach a Photo:
image

Select the photo and click open:

image


With the check Show file activated we can see the photo/document:

image

Also, we can open the document with the right button Open.

-Harry