Sunday, 21 September 2014

Purchase Order Flow in AX 2012 R2

Step 1 :  Account Payable->Common->Purchase Orders ->All Purchase Orders
Step 2 :  Click Purchase Order Icon.
Step 3: Enter necessary information in purchase order header screen.
Step 4: Enter Purchase order line information.
Confirming Purchase Order
Step 5 : Select Purchase Menu on Top
Step 6 : Click on Purchase (Confirming PO with regular popup screen) or Confirm (Confirming PO without popup screen) Button
Receiving Purchase Order (Packing Slip/ Product Receive)
Step 7 : Select Receive Menu on Top
Step 8 : Select Product receipt (Packing Slip)
Step 9 : Enter Packing Slip Information such as Packingslip Number and Qty.
Step 10 : Post Product Receipt
Check Purchase Order Status
Invoicing Purchase Order
Step 11 :  Select Invoice Menu on Top
Step 12 :  Click Invoice Button (Left)
Step 13 : Enter Invoice Information (Number & Invoice Description) on the screen.
Step 13:  Select Post Option on the Top
Check the Purchase Order Status

Monday, 8 September 2014

AX2012 AXUTIL commands to Import,Export,Delete Models

// creating the Model in the Layer

AxUtil create /model:"TestModel" /Layer:CUS

// exporting the model to file
AxUtil export /model:"TestModel" /file:TestModel.axmodel

// importing the model from file
AxUtil import /file:TestModel.axmodel

// delete the model
AxUtil delete /model:"TestModel"

//delete the layer
AxUtil delete /layer:ISV

// if you have multiple instances running
//delete the layer from the database and AXserver.
Axutil delete /layer:ISV /db:<database> /s:<server>

Friday, 1 August 2014

Creation of Number Sequence

Number Sequence Creation Through Code

Suppose we want create number sequence for field on form in General  ledger module
Consideration: EDT-NumberseqTest, Table-NumberseqTestTable and Form- NumberseqTestTable

Step1. Create new EDT with name NumberseqTest


Step 2. Modify load module() method on  NumberSeqModuleLedger class

{
     datatype.parmDatatypeId(extendedTypeNum(NumberseqTest));
     datatype.parmReferenceHelp(literalStr("NumberseqTest"));
     datatype.parmWizardIsManual(NoYes::No);
     datatype.parmWizardIsChangeDownAllowed(NoYes::No);
     datatype.parmWizardIsChangeUpAllowed(NoYes::No);
     datatype.parmWizardHighest(999);
     datatype.parmSortField(30);
     datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
     this.create(datatype);
}

Step 3.Create a method on LedgerParameters Table

     client server static NumberSequenceReference numRefNumberseqTest()
{
     return NumberSeqReference::findReference(extendedTypeNum(NumberseqTest));
}


Step 4.Write and run following job

static void NumberSeqLoadAll(Args _args)
{
    NumberSeqApplicationModule::loadAll();

}


Step 5.Then run the wizard

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



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

static void NumSeq(Args _args)
{
    NumberSeq  numberSeq;
    NumberseqTest num;
    ;
    numberSeq = NumberSeq::newGetNum(ProjParameters:: numRefNumberseqTest ());
    num = numberSeq.num();
    info(num);
}



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


 Write below code in class declaration  
public class FormRun extends ObjectRun
{
    NumberSeqFormHandler numberSeqFormHandler;

}



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

NumberSeqFormHandler numberSeqFormHandler()
{
    if (!numberSeqFormHandler)
    {
       numberSeqFormHandler = NumberSeqFormHandler::newForm(LedgerParameters:: numRefNumberseqTest ().NumberSequenceId,
                                                             element,
                                                             NumberseqTestTable_DS,
                                                             fieldNum(NumberseqTestTable, NumberseqTest)
                                                            );
    }
    return numberSeqFormHandler;
}




Step 9.Write the  Create(),Delete(),Write() , Validate Write(),Link Active() on the Data source methods node.
 Create() Method
void create(boolean append = false,
            boolean extern = false) 
{
    element.numberSeqFormHandler().formMethodDataSourceCreatePre();

    super(append);

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

Delete() Method

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

Write()Method

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



Validate Write() Method

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

Link Active() Method

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


Step 10.Finally add Close() method on form
void close()
{
    if (numberSeqFormHandler)
    {
        numberSeqFormHandler.formMethodClose();
    }
    super();
}

Saturday, 26 July 2014

Code Compiler

To compile X++ code, open the code in the Code editor and press F7, or press the Compile icon.
If you are using the Version Control system for Microsoft Dynamics AX, the X++ compiler is also activated when you check an object in.
The compiler output window is described in the online Help. For the Help topic about the compiler output window, see Compiler Output Form. Or for information about theSysCompilerOutput class, you can use the Application Object Tree (AOT). Highlight the node Classes > SysCompilerOutput, and then press F1. This starts a web browser that opens to a Help topic for the class.

You can change the appearance and content of the compiler output window by using the compiler setup form that is available by clicking the menu Tools > Options > Development >Compiler. This starts the Compiler setup form. You can use the Compiler setup form to change the warning levels that are reported to the compiler output window, or to choose whether cross-reference is updated during each compile.

Sunday, 13 July 2014

How to configure the number of simultaneous remote connections allowed for a connection

To configure the number of simultaneous remote connections allowed for a connection
  1. On the RD Session Host server, open Remote Desktop Session Host Configuration. To open Remote Desktop Session Host Configuration, click Start, point toAdministrative Tools, point to Remote Desktop Services, and then click Remote Desktop Session Host Configuration.
  2. Under Connections, right-click the name of the connection, and then click Properties.
  3. In the Properties dialog box for the connection, on the Network Adapter tab, click Maximum connections, enter the number of simultaneous remote connections that you want to allow for the connection, and then click OK.
    If the Maximum connections option is selected and dimmed, the Limit number of connections Group Policy setting has been enabled and has been applied to the RD Session Host server.