Showing posts with label 2009. Show all posts
Showing posts with label 2009. Show all posts

Friday, 11 March 2016

How to: Trace a Call to an AIF Web Service

How to trace a call from an external client to an X++ service exposed as a Web service in Microsoft Dynamics AX. When you call the Web service, the call goes to the Web service and is then passed to the AOS. You can use tracing to capture the parameters the client sends to the Web services as well as the parameters that are sent from the Web service to the AOS. 

https://msdn.microsoft.com/en-us/library/cc967372(v=ax.50).aspx

How to delete the file from particular location in Axapta

 WinApi::deleteFile(filepath);

strLfix & strRfix Function - Append zeros to the String - AX 2009

The following code used to append zeros to the string either left /Right.

static void Append(Args _args)
{
    int i = 1;
    str Append;
    str finalResult;
    ;

   Append= strlFix(int2str(i), 5, "0"); // Create a string, with a length of 5, ending with the value of ''i'' and padded with zeros
finalResult = strFmt("%1", Append);
info(finalResult);

}

strLfix & strRfix Function - Append zeros to the String - AX 2009

The following code used to append zeros to the string either left /Right.

static void Append(Args _args)
{
    int i = 1;
    str Append;
    str finalResult;
    ;

   Append= strlFix(int2str(i), 5, "0"); // Create a string, with a length of 5, ending with the value of ''i'' and padded with zeros
finalResult = strFmt("%1", Append);
info(finalResult);

}

How to delete the file from particular location in Axapta

 WinApi::deleteFile(filepath);

How to: Trace a Call to an AIF Web Service

How to trace a call from an external client to an X++ service exposed as a Web service in Microsoft Dynamics AX. When you call the Web service, the call goes to the Web service and is then passed to the AOS. You can use tracing to capture the parameters the client sends to the Web services as well as the parameters that are sent from the Web service to the AOS. 

https://msdn.microsoft.com/en-us/library/cc967372(v=ax.50).aspx

Troubleshooting BizTalk Web Services - AX 2009

how to identify and resolve common Web service issues.

https://msdn.microsoft.com/en-us/library/aa995583.aspx

Troubleshooting BizTalk Web Services - AX 2009

how to identify and resolve common Web service issues.

https://msdn.microsoft.com/en-us/library/aa995583.aspx

RPC errors when calling WinAPI method from a batch job.

I found a very good article about the errors and issues when we are calling WinAPI class from a Batch job.

https://blogs.msdn.microsoft.com/floditt/2009/01/29/rpc-error-1702-when-calling-a-winapi-method-from-a-batch-job/

RPC errors when calling WinAPI method from a batch job.

I found a very good article about the errors and issues when we are calling WinAPI class from a Batch job.

https://blogs.msdn.microsoft.com/floditt/2009/01/29/rpc-error-1702-when-calling-a-winapi-method-from-a-batch-job/

How to find USR Layer objects in entire AOT

I found some instersting content about how we can find the USR layer code in entire AOT.

http://theaxapta.blogspot.fr/2012/05/how-to-find-all-usr-layer-element-in.html

How to find USR Layer objects in entire AOT

I found some instersting content about how we can find the USR layer code in entire AOT.

http://theaxapta.blogspot.fr/2012/05/how-to-find-all-usr-layer-element-in.html

Finding out which tables were updated by an operation in AX

At times when troubleshooting Microsoft Dynamics AX you need to know which tables were updated by a particular operation, for example after performing a posting. This could be if you want to be sure that all the right tables are updated correctly after an upgrade, if you have unexpected results on one customer/vendor etc or if you have made an update the system and you want to be sure that everything is ok.


https://blogs.msdn.microsoft.com/axsupport/2013/09/27/finding-out-which-tables-were-updated-by-an-operation-in-ax/

Finding out which tables were updated by an operation in AX

At times when troubleshooting Microsoft Dynamics AX you need to know which tables were updated by a particular operation, for example after performing a posting. This could be if you want to be sure that all the right tables are updated correctly after an upgrade, if you have unexpected results on one customer/vendor etc or if you have made an update the system and you want to be sure that everything is ok.


https://blogs.msdn.microsoft.com/axsupport/2013/09/27/finding-out-which-tables-were-updated-by-an-operation-in-ax/

Setup & Config of AX 2012 R2 VM in VirtualBox

Here are the Links to Configure and instal Ax2012 VPC to Oracle Virtual BOX.

http://www.youtube.com/watch?v=klV6qh211EI

Setup & Config of AX 2012 R2 VM in VirtualBox

Here are the Links to Configure and instal Ax2012 VPC to Oracle Virtual BOX.

http://www.youtube.com/watch?v=klV6qh211EI

reRead( ) in AX 2009 - Best Advantage

To avoid most of the UpdateConflicts / DeadLock errors while update a record in a table, just use the "reRead( )" method of the table before making any changes to the selected record of the table.

Ex : 

;

ttsbegin;

select forUpdate tSalesLine where tSalesLine.SalesId = = 'SO-1234567';

tSalesLine.reRead( );

tSalesLine.Feild1 = XXXXX;
tSalesLine.Feild2 = XXXXX;

tSalesLine.update( );

ttscommit;

reRead( ) in AX 2009 - Best Advantage

To avoid most of the UpdateConflicts / DeadLock errors while update a record in a table, just use the "reRead( )" method of the table before making any changes to the selected record of the table.

Ex : 

;

ttsbegin;

select forUpdate tSalesLine where tSalesLine.SalesId = = 'SO-1234567';

tSalesLine.reRead( );

tSalesLine.Feild1 = XXXXX;
tSalesLine.Feild2 = XXXXX;

tSalesLine.update( );

ttscommit;

How to add Filter functionality to Display method in dynamics AXAPTA

This below code will work for filters to display method also.

Step 1:
Go to the form design right click on particular control properties Auto Declaration No to Yes.

Step 2:
Override the context() method on the display method .

public void context()
{
    int             selectedMenu;
    formrun         fr;
    Args            ag;
    Name            strtext;
    querybuilddataSource qb1;
    queryrun    qr;
    query       q;
    PopupMenu menu = new PopupMenu(element.hWnd());
    int a = menu.insertItem('Filter By Field');
    int b = menu.insertItem('Filter By Selection');
    int c = menu.insertItem('Remove Filter');
    ;
q   = ItemControl_ds.query();
qb1 = q.dataSourceTable(tablenum(ItemControl));
qb1 = qb1.addDataSource(TableNum(SalesTable));
qb1.addLink(FieldNum(ItemControl,PO),FieldNum(SalesTable,PurchOrderFormNum));

selectedMenu = menu.draw();
    switch (selectedMenu)
    {
    case -1: //Filter by field
            break;
    case a:
            ag = new args('SysformSearch');
            fr = new formrun(ag);
            fr.run();
            fr.wait();
//Reading User entered value for filter process
            strtext = fr.design().controlName('FindEdit').valueStr();
            if(strtext)
            {
//Creating a query for filter
                
                qb1.addRange(FieldNum(SalesTable,SearchName)).value(strtext);
                ItemControl_ds.query(Q);
                ItemControl_ds.executeQuery();
            }
            break;

    case b:                                      // Filter By Selection
           
            qb1.addRange(FieldNum(SalesTable,SearchName)).value(ProjName.valueStr());
            ItemControl_ds.query(Q);
            ItemControl_ds.executeQuery();
            break;

    case c :                                      // Remove Filter
            q   = new Query();
            qb1 = q.addDataSource(tablenum(ItemControl));
            qb1.clearLinks();
            qb1.clearRanges();
            ItemControl_ds.query(Q);
            ItemControl_ds.removeFilter();
            break;

    Default:
            break;
    }

}

How to pass control value in form to class in AXAPTA

Step :1

Write the method in Form level like :

public str method1()

{

         return control.Text();

}
Step 2:

Write this code in class level where we need to use the value

 if(formHasMethod(args.caller(), identifierStr(MethodName)))
    {
       strcustname =  args.caller().MethodName();
    

   }