Tuesday, 5 December 2017

Back to Pavilion!

Hi Friends,

After long time i am back on my blog and really excited to share my findings on AX. 

Saturday, 29 June 2013

Fetch Method in Axapta Reports

Fetch Method is used to Filter the Records taht are being sent to the Final Report


Here is the Example

public boolean fetch()
{
    boolean retCode = false;
    BankAccountTable bankAccountTableRec;
    QueryRun qrun;
    ;
    // Use the queryRun object that is associated with the
    // report; element refers to the report.
    qrun = new QueryRun(element);

    // Verify that the report dialog works.
    if (! qrun.prompt())
    {
        return retCode;
    }

    // Loop through each record from the data source query of the report.
    while (qrun.next())
    {
        // Get the BankAccountTable fields from the query record.
        bankAccountTableRec = qrun.get(TableNum(BankAccountTable));

        // Exclude ODDBANK from the visible report.
        if (bankAccountTableRec.AccountID != "ODDBANK")
            {
                // Include the current record in the report.
                element.send(bankAccountTableRec);
            }
    }
    retCode = true;

    // retCode = super(); // Do not call super() when you override the fetch method.
    return retCode;
}


       

Tuesday, 22 November 2011

Using graphics in forms and legacy reports

Override Standard Query in Report Fetch Method

Hi
  They are some simple steps which can be followed while overriding Fetch Method to get values from standard Query of a Report as follows:

       queryRun = new QueryRun(this);    queryRun.query().dataSourceTable(tablenum(tablename)).addRange(fieldnum(tablename,Fieldname)).value(queryvalue(dialogbox fieldvalue));
////
We can Use SysQuery Class Range method as follows
 SysQuery::Range(<value range>) 
we can also use queryRange (date1 , date2) instead of queryvalue()




Regards
Reddy

Tuesday, 2 August 2011

Restoring Data Base and Application From One Domain to Another Domain

Hi
      For Restoring the Application and DB they are few simple Steps which can be followed as follows

Step1:Restore the Data Base which we need to attach to the Application
Step2:Install the Standard Application Excluding Data Base and Attach the Data Base which was Restored .
Step3:Replace the Application Files of Standard with the Required Application Files.
Step4:Compile the Application and Synchronize the Data Base

    When we Open the Application  it may Prompt that You are Not Recognized User of Microsoft Dynamics AX.Contact Your System Administrator.
Step5:To Solve this Issue u Need to Authenticate the Currently Logged in User in the UserInfo Table.Here we need to Provide The Network Alias as the User Name ,Domain and SID(Security Identification)
     To Know the SID Go> Run >Regedit>Computer>HKEY_CURRENT_USER\Software\Microsoft\Protection Storage Security Provider\XXXXXXXXXXXXXXXXXX
    
          Copy the SID From here and Paste in SID Field of Userinfo Table

By this we can Restore the Application and DB From one  Domain to Another Domain Successfully.


Regards
Santhosh Reddy
-It's kind of fun to do the impossible 

Sunday, 24 July 2011

Getting the Port No Through Code in Axapta

Hi Friends

        Following code illustrates in getting the PortNo  in Axapta Through Code.Session Class can also be used to get the AOS Name and the Client System Name.

            
static void GetAOSPort(Args _args)
{  ;
   info(strfmt("Port number: %1",int2str(Session::getAOSPort())));
}


         
Regards
Santhosh Reddy
-It's kind of fun to do the impossible