Followers

15 August 2019

Barcode in ax

Code for barcode in ax :


 public BarCodeString getBarcode(str _barCodeText)
    {
         

        BarCodeString   barCodeString;
        Barcode         barcode;
        barcode = Barcode::construct(BarcodeType::Code128);

        barcode.string(true, _barCodeText);
        barcode.encode();
        barCodeString = barcode.barcodeStr();
     
        return barCodeString;
       
    }

14 August 2019

Create the macro in AX

Create the macro in AX :


> Create macro and double click on micro
Ex: MicroName
> Assign micro

Ex : #define.fieldname('filedname')

     #define.TireWarr('TireWarr')

>Assign micro where you need in class

ex: #microname


Excute the runnable class in D365

Excute the runnable class in D365 :


https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=USMF&mi=SysClassRunner&cls=Classname


Ex:

https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=USMF&mi=SysClassRunner&cls=ShowInvoicedOrderCount

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.