Tuesday, 17 July 2012

How to display a welcome message when the user login into AX


Hello Friends,


Today i want to share you a small and funny thing.i.e:

"How to display a welcome message when the user login into AX "

Just do this
go to classes >> StartUpPost method and paste the below code into code editor:

void startupPost()
{
    UserInfo UserInfo;
    select Name from UserInfo where UserInfo.id==curUserId();
    info('Welcome to '+UserInfo.name);
}
Then to check this close your ax and open again you will get the info message with your name.

Wednesday, 11 July 2012

Dynamics AX Technical Interview Questions

 Hello,

Today i want to share you some important Technical Interview questions: 


1. Major customization on forms, tables (That you have faced)
2. What is cluster installation?
3. Table collections?
4. Steps in creating number sequence?
5. Any module you are good at.
6. Collection classes
7. Tables in inventory
8. If you manipulate anything which layer would it affect?
9. Steps in data migration.
10. How to add a lookup in a form
11. What is temporary table and in which context is it used?
12. What are the components in reports?
13. How many types of classes are there?
14. RunBase framework and runbase classes
15. Development tools
16. Communication tools
17. Difference between auto generated specs and generated design specs
18. Display and edit method.
19. Can you say few best practises in ax.
20. Elements in AOT.
21. Can you have graphical representation of ssrs?
22. Steps for ssrs.
23. Steps in ssas.
24. What is the difference between sql queries and dynamics queries.
25. What is the difference between x++ and c#?
26. Installation steps in ax.
27. Difference between doupdate and updates
28. Different delete actions
29. Active, Passive, Delayed joins
30. What can’t you store in containers
31. Difference between arrays and containers
32. Logic for converting string to uppercase
33. Override methods in tables, forms
34. What is super() used for?
35. What is init method?
36. What are the sequence of methods while running a report?
37. What is EDT?
38. What is JumpRef()?
39. About form/ reports/ tables methods.
40. D.B Abstract and final class.
41. D.B ValidateWrite and write.
42. What is dialoge class.
43. Pack and Unpack method.
44. Number of elements in enum.
45. Architecture of MS dynamics AX.
46. Tell us about AIF(MSMQ).
47. What is perspectives?
48. How to design a form in AX using X++?
49. What is report builder?
50. What is Index, properties in Index and types of Index?
51. Any knowledge about Share Point.
52. Concept of Different Layer in AX.
53. difference between temporary table and container?
54. difference between bound and unbound controls?
55. what are maps and which method we use in maps?
56. classes in AIF?
57. how to create runtime query?
58. difference between pass by reference and pass by value?
59. types of relations(normal,field fixed,related field fixed)?
60. what are delete actions?
61. how to access tables of different companies(crosscompany)?
62. What is optimistic concurrency control?
63. What are transactions?
64. how to lock a transactions?
65. what are macros?
66. what is the default link type property?
67. difference between validate write and validate field?
68. Do we have validate write and validate field in form level?
69. what are the methods required for posting a purchase order?
70. how to give null in select query?

Simple Steps To Create Number Sequence In Ax2012


           
Creating number seq:

 Hello Friends,
Today i want to describe about how to create number sequence in AX2012

It is same as like as we know in Ax2009 but small steps is added in AX2012.don't worry just follow the below steps simply we will get number sequence in AX2012.

We will Take a EDT name as "Car Id" and create in number sequence.For that first we should select a module for new number sequence for example project module.
                                   
steps:

1.  Create an edt : CarId .

     AOT >> Extended Data Types >> New  >> Properties >> Name  >> Car Id.

2. Write a code on lode module() on NumberSeqModuleProject

{
     datatype.parmDatatypeId(extendedTypeNum(Car Id));
     datatype.parmReferenceHelp(literalStr("@SYS334483"));
     datatype.parmWizardIsManual(NoYes::No);
     datatype.parmWizardIsChangeDownAllowed(NoYes::No);
     datatype.parmWizardIsChangeUpAllowed(NoYes::No);
     datatype.parmWizardHighest(999999);
     datatype.parmSortField(20);
     datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
     this.create(datatype);
}

3.Write a method on Projparameters Table

     client server static NumberSequenceReference numRefcarId()
{
     return NumberSeqReference::findReference(extendedTypeNum(car Id));
}

4.Write a job and run that

static void Carid(Args _args)
{
    NumberSeqModuleProject  NumberSeqModuleProject = new NumberSeqModuleProject();
    ;
    NumberSeqModuleProject.load();
}


5. Then run the wizard

   Organization Administration >> CommonForms >> Numbersequences>>Numbersequences>> Generate >> run the wizard.

6.Now we have to check the number sequence  is correctly working  for that write a job:

static void number(Args _args)
{
    NumberSeq  numberSeq;
    CarId num;
    ;
    numberSeq = NumberSeq::newGetNum(ProjParameters::numRefcarId());
    num = numberSeq.num();
    info(num);
}

  Run the above job.We will find the generated Number     sequence.                                                    .

7. Now we want that Number Sequence in form level(Car Table):

Declare the number sequence On Form Declaration:
 
public class FormRun extends ObjectRun
{
    NumberSeqFormHandler numberSeqFormHandler;

}

 8. Write the NumberSeqFormHandler() in form methods node.

NumberSeqFormHandler numberSeqFormHandler()
{
    if (!numberSeqFormHandler)
    {
        numberSeqFormHandler = NumberSeqFormHandler::newForm(ProjParameters::numRefcarId       ().NumberSequenceId,
                                                             element,
                                                             CarTable_DS,
                                                             fieldNum(CarTable, Car Id)
                                                            );
    }
    return numberSeqFormHandler;
}


9.Write the close() on the form methods node.

void close()
{
    if (numberSeqFormHandler)
    {
        numberSeqFormHandler.formMethodClose();
    }
    super();
}

10. Then final add the below methods on data source methods node
Create()

void create(boolean append = false,
            boolean extern = false)  // If created externally
{
    element.numberSeqFormHandler().formMethodDataSourceCreatePre();

    super(append);

    if (!extern)
    {
        element.numberSeqFormHandler().formMethodDataSourceCreate(true);
    }
}

Delete()

public void delete()
{
    element.numberSeqFormHandler().formMethodDataSourceDelete();
    super();
}

Write()

public void write()
{
    super();
    element.numberSeqFormHandler().formMethodDataSourceWrite();
}

Validate Write()

public boolean validateWrite()
{
    boolean         ret;
    ret = super();
    ret = element.numberSeqFormHandler().formMethodDataSourceValidateWrite(ret) && ret;
    if (ret)
    {
        CarTable.validateWrite();
    }
    return ret;
}

Link Active()

public void linkActive()
{
    ;
    element.numberSeqFormHandler().formMethodDataSourceLinkActive();
    super();
}

 Now our numberseqence is generated .

*** Set the field or Tabpage Allowedit property to No.
***Check the continues on wizard.