Wednesday, December 1, 2021

How to call standard button Clicked method from customized button in D365FO

Hi Guy's,

Recently, I received one requirement where we need standard button clicked method logic to be called from customized button on the same form but in another Action Pane Tab and button group.

To achieve this requirement, I used COC of the form and retrieve the button control in variable. I easily able to call the method's define on the button.

Please check below code.

[ExtensionOf(formStr(WHSLoadTable))]
final class WHSLoadTableForm_Extension
{

[FormControlEventHandler(formControlStr(WHSLoadTable, PickList), FormControlEventType::Clicked)]
public static void PickList_OnClicked(FormControl sender, FormControlEventArgs e)
{
        FormButtonControl callerButton = sender as FormButtonControl;

                  FormRun form = callerButton.formRun();

                  FormButtonControl btnPickList = form.design(0).controlName("WHSPickListShipping") as                 FormButtonControl;

                btnPickList.clicked();

        }
}

Happy Learning !!

Friday, September 3, 2021

Unable to find the report design reportName.DesignName in D365FO

 

 D365FO - Report error -

Unable to find the report design reportName.DesignName


 

If the report is not deployed on the server and you try to run the report from the front end then you will receive the error as ‘Unable to find the report design reportName.DesignName.

Go to Visual Studio and deploy the report and recheck the report from the front end.

Friday, December 20, 2019

AOS service not starting | SYSTIMEZONESVERSION

After installation of AOS, Service couldn't started due to systemtimezoneversion missmatch. Error is as below -

Error message: "The internal time zone version number stored in the database is higher than the version supported by the kernel (11/8). Use a newer Microsoft Dynamics AX kernel."

Resolution :
SELECT * FROM SQLSYSTEMVARIABLES where parm ='SYSTIMEZONESVERSION';
--Result is 11
Update SQLSYSTEMVARIABLES set value=7 where parm='SYSTIMEZONESVERSION';
--update it to 8

Thursday, September 26, 2019

Update cross reference in batch job - AX 2012 R2, R3

Below is the code snippets to update cross references of all AOT objects through batch job.

static void UpdateCrossRefBatch(Args _args)
{
   ;
   xRefUpdate::truncateXrefTables();
   xRefUpdateIL::updateAllXref(true, false, true);
   info("Done, cross reference update batch job created.");
}

Batch job will get added with the description as "Update xref for complete AOT" .

Happy Daxing !!

Thursday, May 31, 2018

Add display method to List page (VendTableListPage) AX 2012

Hi Experts,

As per requirement of client, PAN number should be display on vendor list page. I have created a display method on VendTable and added to vendTableListPage design


display PANNumber_IN getVendPANNumber()
{
    TaxInformationVendTable_IN      taxInformationVendtable_IN;

    select firstOnly PANNumber from taxInformationVendtable_IN
        where taxInformationVendtable_IN.VendTable == this.AccountNum;

    return taxInformationVendtable_IN.PANNumber;
}



After adding fields on Design, Save and compile the form.
**Most Important**
Go to the front end i.e. AX Client, Accounts Payable/ Vendors, the vendor list page form will open, Right click on form then Click on Reset button. After this you have to close the form and reopen again.