Followers

19 September 2018

Update the fields values from one field to another field while click the menuitem button in form AX2012

Update the fields values from one field to another field while click the menu item button in form AX2012 :

1) Create the class
2) Create menu item (Action) and add the created class for menu item.
3) Created menu item attached in form menu item button.
4) override the menu item button for refresh the data source.

Ex Code:

Class:

class PMCopyEquipmenttoCLR
{

}

public void CopyEquipmenttoCLR(Args _args)
{
    PMSubJobLotLevelLines    pmSubJobLotLevelLines, pmSubJobLotLevelLinesloc;
    pmSubJobLotLevelLinesloc = _args.record();

    update_recordset pmSubJobLotLevelLines
              setting Additional4 = pmSubJobLotLevelLines.EquipmentNumber
                 where pmSubJobLotLevelLines.Selected == NoYes::Yes
                        && pmSubJobLotLevelLines.SubJobId == pmSubJobLotLevelLinesloc.SubJobId
                        && pmSubJobLotLevelLines.EquipmentNumber!= "";
}

public static void main(Args _args)
{
    PMSubJobLotLevelLines       pmSubJobLotLevelLines;
    PMCopyEquipmenttoCLR        pmCopyEquipmenttoCLR;
    FormDataSource              PMSubJobLotLevelLines_ds;

    pmCopyEquipmenttoCLR        = new PMCopyEquipmenttoCLR();

    if (_args.record() && _args.record().TableId == tableNum(PMSubJobLotLevelLines))
    {
        pmSubJobLotLevelLines          = _args.record();
        PMSubJobLotLevelLines_ds       = pmSubJobLotLevelLines.dataSource();
        pmCopyEquipmenttoCLR.CopyEquipmenttoCLR(_args);
    }
}


This is the class for menu item button clicked for update the fields from one to another column.

17 September 2018

Copy data from one field to another field in table for selected lines while button clicked in form in AX2012

Copy data from one field to another field in table for selected lines while button clicked in form in AX2012 :

Example Code:

void clicked()
{
    PMSubJobLotLevelLines   tPMSubJobLotLevelLines;
    tPMSubJobLotLevelLines = PMSubJobLotLevelLines_ds.getFirst();
    while (tPMSubJobLotLevelLines)
    {
        if (tPMSubJobLotLevelLines.Selected == NoYes::Yes)
        {
           
            ttsBegin;
            tPMSubJobLotLevelLines.Additional4 = tPMSubJobLotLevelLines.EquipmentNumber;
            tPMSubJobLotLevelLines.update();
            ttsCommit;
        }
            tPMSubJobLotLevelLines = PMSubJobLotLevelLines_ds.getNext();

    }
    super();

}


14 November 2017

Related TFS(Team Foundation Server) Articles

TFS Articles:


Now a days I went through TFS. TFS is related to development work and source code management, what makes developer’s life easier.And also helps for support Quality Assurance guidance and validations, testing and all the rest of Application.A developer can view different versions of modifications done by others and more secure other developer code. 

Below links are related to TFS:

1) http://www.dotnetcurry.com/ShowArticle.aspx?ID=120
2) https://www.axug.com/blogs/viral-suthar/2016/01/28/microsoft-dynamics-ax-2012-r3-and-tfs-online
3) https://stoneridgesoftware.com/tfs-code-repository-and-dynamics-ax/
4) http://dev.goshoom.net/en/2012/07/tfs-workspaces-in-ax2012/

Send email notification when there is an update/change to the invoice account on sales order

To am going explore How to setup the email notification for changing any fields:

1) Configure the Email  with below path

 >USMF/System administration/Common/Users/Users
>Option>General> Give Email id(which is in server domain)
>Notification>set the pop up notification (tick)
>Notification > set the email notification (tick)

2)USMF/System administration/Periodic > Alerts>Change Based Alerts

 >Run the batch job for alerts, before that keep the recurrence for running the batch job.
>Set the batch group as Alerts.

3)Goto the batch job  and check the batch job status for below path

>USMF/System administration/Inquiries>batch job

4) Create the alert rule for particular field which you want to change the field

     ex: Invoice account

> Invoice account>RC(right click)>create alert rule
> set the rule for change type
>Check the notification pop box
> check the Email

5) After 4 steps,when changing invoice account , popup notifications and email notification will get with configured Email Id.





14 December 2016

Sale Order and Purchase Order Tables and Classes

Sale Order classes and Tables:

SalesTableType and SaleslineType classes will get called while creating the Sales Orders.
SalesFormLetter_Confirm
SalesFormLetter_PickingLlst

SalesFormLetter_PackingSlip
SalesFormLetter_Invoice
Classes used to post the sales order at various document status (packing, invoice etc).
Tables:


Sales Table contains all Sales Order headers regardless whether they have been posted or not.
The SalesParmTable and SalesParmLine contains detailed information regarding posting sales headers and Lines.
CustConfirmJour and CustConfirmTrans tables contains all Sales Confirmation headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.
CustPackingSlipJour and CustPackingSlipTrans tables contains all sales Packing Slip headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.
CustInvoiceJour and CustInvoiceTrans tables contains all sales all Sales Invoice headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.

Purchase Order classes and Tables:


PurchTableType and PurchTableLine classes will get called while creating the PurchaseOrders.
PurchFormLetter_PurchOrder
PurchFormLetter_PackingSlip
PurchFormLetter_ReceiptsList

PurchFormLetter_Invoice
classes will be used to post the PurchaseOrder at various document status (packing, invoice etc).
Tables:
PurchTable contains all purchase order headers regardless whether they have been posted or not.
PurchParmTable and PurchParmLine contains detailed information regarding posting Purchase headers and Lines.
VendPackingSlipJour and VendPackingSlipTrans tables contains posted packingslip headers and lines.
VendInvoiceJour and VendInvoiceTrans tables contains all invoiced purchase order headers and Lines.
VendReceiptsJour and VendReceiptsTrans tables contains posted receipt header and lines.
VendPurchOrderJour and VendPurchOrderTrans tables contains Purchase requisition headers and lines.

Joins concept

Joins:

In ax 4 types of joins is there:

1) Inner join : Select the record from Main Table that have matching record form child table. These two records together and gives single record.

2) Outer join : select all records from Main Table and select the related records from child table. If there is no match ,it gives empty value

3)Exist join : select the records from Main table if there is any records matching in child table. It should return only main table not child table records.

4)Not Exist join : select the records from Main Table if there is no matching records in Child Table. opposite of Exist join.