Wednesday, 25 November 2015

Find,Display Method's
Find:
public static VendTable find(
    VendAccount             _vendAccount ,
    boolean                 _forupdate        = false,
    ConcurrencyModel        _concurrencyModel = ConcurrencyModel::Auto)
{
    VendTable vendTable;

    vendTable.selectForUpdate(_forupdate);
    if (_forupdate  && _concurrencyModel != ConcurrencyModel::Auto)
    {
        vendTable.concurrencyModel(_concurrencyModel);
    }

    if (_vendAccount != '')
    {
        select firstonly vendTable
            where vendTable.AccountNum == _vendAccount;
    }

    return vendTable;
}

Display:
display public locality locality()
{
    return VendTable::find(this.OrderAccount).Locality;
}

Monday, 23 November 2015

LIKE OPERATOR USE  IN AX2012
static void CON_likeoperator(Args _args)
{
    PurchLine           purchLine;
    PurchTable          PurchTable;

    //SELECT PurchLine where PurchLine.purchid like "0005%";
    while SELECT PurchId from  PurchLine where purchLine.PurchId like "*5*"
    {
        info(strFmt("%1",purchLine.PurchId));
    }
}

Friday, 20 November 2015

The Process For SalesOrder Creation, Class's & Table's Involved In the process

SlaesOrder Creation Process:

They are 4 Major Process Steps involved in the Creation Of Sales Order:
1. Confirmation.
2. Picking List
3. Packing Slip
4. Invoice.

1. Confirmation Class's & Tables That are related to Confirmation process are following:
               Tables  : CustConfJour , CustConfTrans.
                Class's : SalesFormLetter_Confirm.

2. PickingList Class's & Tables That are related to PickingList process are following:
           Tables  : WMSPickingRout , WMSOrderTrans.
           Class's : SalesFormLetter_PickingList.

3. PackingSlip Class's & Tables That are related to PackingSlip process are following:
            Tables  : CustPackingSlipJour , CustPackingSlipTrans.
            Class's : SalesFormLetter_PackingSlip.

4. Invoive Class's & Tables That are related to Invoice process are following:
     Tables  : CustInvoiceJour , CustInvoiceTrans.
     Class's : SalesFormLetter_Invoice.

The Process For PurchaseOrder Creation, Class's & Table's Involved In the process

PurchaseOrder Creation Process:

They are 4 Major Process Steps involved in the Creation Of Purchase Order:
1. Confirmation/PurchOrder.
2. Receipt List
3. Packing Slip/Product Receipt
4. Invoice.

1. Confirmation Class's & Tables That are related to Confirmation process are following:
               Tables  : VendPurchOrderJour , VendPurchOrderTrans.
               Class's : PurchFormLetter_PurchOrder.

2. ReceiptList  Class's & Tables That are related to ReceiptList process are following:
            Tables  : VendReceiptListJour , VendReceiptListTrans.
            Class's : PurchFormLetter_ReceiptList.

3. PackingSlip Class's & Tables That are related to PackingSlip process are following:
            Tables  : VendPackingSlipJour ,VendPackingSlipTrans.
            Class's : PurchFormLetter_PackingSlip.

4. Invoive Class's & Tables That are related to Invoice process are following:
     Tables  : VendInvoiceJour , VendInvoiceTrans.
     Class's : PurchFormLetter_Invoice.

Wednesday, 18 November 2015

Changing the color of a row, using a condition in the grid:

  • I created a new form with custtable data source.
  • In the design node,added a grid with some fields(accountnum, custgroup, creditmax, cashdisc) .
  • Override the displayoptions method in the custtable datasource.

public void displayOption(CustTable _CustTable, FormRowDisplayOption _options)
{
    int myColor=WinApi::RGB2int(50,255,50);
;

//if(_CustTable.CreditMax <= 100100)
    if(_CustTable.CustGroup == "30")
_options.backColor(myColor);

super(_CustTable, _options);
    //CustTable_ds.research();
}

Wednesday, 4 November 2015

How to enable and disable fields conditionally in Axapta Dialogs

Similar to forms, to enable and disable the fields conditionally in Axapta dialogs, the following steps to be followed:


1. In the class, declare the dialog variable as ‘DialogRunbase’




2. Override the dialogPostRun method in the class as follows:
public void dialogPostRun(DialogRunbase _dialog)
{
;

super(_dialog);

_dialog.dialogForm().formRun().controlMethodOverload(true);
_dialog.dialogForm().formRun().controlMethodOverloadObject(this);
}

3. Assuming the dialog field as fld3_1, override/create the method as follows:



To summarize the same, the ItemGroupId is the (fld3_1) field. Upon selecting the value in this field, the Division field should get disabled


Deleting Transactions in Axapta

For deleting all the transactions in an Axapta company, in a quick way, the following steps to be followed:
1. Duplicate any existing company having data.
Administration--> Company Accounts --> Duplicate
2. Select the duplicated company.
3.Open SysDatabaseTransDelete class from the AOT.




4. Click on 'Yes' button from the 'Delete all transactions' window.



5. Export the company data in .dat and .def format from:

Administration -->Periodic --> Data export/import -->Default data --> Export

Such created .dat & .def files can be used for creating any new companies.
This way, we can have a company data without any transactions. Very helpful for creating new companies with setup data without any transactions.