Monday, December 24, 2018

Update multiple selected records on form in AX 2012 through Class and Passing parameter from Form to Class

Passing parameter through Args in AX is very easy important functionality. To demonstrate this i used one form and added one button to call class.
Below are the artefacts:

Table:pocVehicle
Class:POCVehicleMasterClass
ManuItem:POCVehicleMasterClass

Method on Form button click:
void clicked()
{

MenuFunction mf;
  //POCVehicle pocVehicle;

Args args=new Args();
;
args.record(pocVehicle);
mf= new MenuFunction(identifierStr(POCVehicleMasterClass), MenuItemType::Action);
mf.run(args);


Main Methods on Class POCVehicleMasterClass :


Public static void main(Args _args)

{
POCVehicle pocVehicle;

POCVehicleMasterClass myClass;

FormDataSource formdatasource;

Common common;
;

myClass= new POCVehicleMasterClass();

if(_args.record().TableId==tableNum(POCVehicle))

{
//Buffer selected records
common=_args.record();
//formdatasource=_args.record().dataSource();
//Records data source
formdatasource=common.dataSource();
//Passing parameter to class updateRecord method
myClass.UpdateRecord(formdatasource,_args);
}

}


Second method on the class:

Public void UpdateRecord(FormDataSource datasource, Args args)
{

POCVehicle pocvehicle;
FormDataSource formDataSource;
int recordCount, recorUpdated;
;

formDataSource= datasource;
//Count selected records
RecordCount= formDataSource.recordsMarked().lastIndex();
recorUpdated=0;

//Update all selected records
for(pocvehicle=formDataSource.getFirst(true)? formDataSource.getFirst(true): formDataSource.cursor() ; pocvehicle ;pocvehicle=formDataSource.getNext())

{
ttsBegin;
pocvehicle.Insurence= NoYes::No;
pocvehicle.update();
ttsCommit;
recorUpdated++;

}
//Refresh caller form datasource with same pointer

formDataSource.research(true);

info(strFmt('%1 records selected and %2 records updated ', RecordCount,recorUpdated));
  
}

Monday, September 1, 2014

AX Interview Question

Hi friends, Before to dive in actual post i would like to thank to all my friends for your love and appriciation. I hope attached document will help to find out some good question and answer for interview. Happy DAXing!!!

Tuesday, August 19, 2014

In-Place Data upgrade checklist issue in AX 2012 R3 and AX 2012 R2 upgrade



Issue:
We observed this during AX 2012 R2 and AX 2012 R3 data upgrade other than the Launch Data Upgrade stage, a different stage Presynchronization is blocked: instead of showing the ReleaseUpdateCockpit form but the ReleaseUpdateScriptsHistory form pops up unexpectedly. 

Solution:This turned out that back dated rows were recorded into the log table ReleaseUpdateScriptsHistory (ScriptStage=16: Presynchronization; ScriptStage=17: Launch Data Upgrade).  We have dropped the relevant records from the ReleaseUpdateScriptsHistory:

  delete from ReleaseUpdateScriptsHistory where ScriptStage in (16,17,18)

After dropping data Presynchronization and launch data upgrade worked properly.

Happy DAXing!!!
 


Wednesday, October 9, 2013

EP in AX 2012 R2



EP Home Page in AX 2012 R2



Sunday, October 6, 2013

Create SO through AIF

Hi friends File System adapter play vital role while we integrate AX with any other application. So here a process to create SO and return his Sales id through the AIF. Happy DAXing!!!

AX 2012 R2 CU1 Upgrade


Hi Friends again I am here with a mesmerizing post "AX 2012 R2 CU1 upgrade" which is a complete and meticulous document for in-place upgrade along with the retail and many ISV's. I hope it will help you to conquer the Upgrade.....Happy DAXing!!!!!

Thursday, May 30, 2013

AX 2012 CU4 Upgrade

AX 2012 Process flow: Hi all now we jump in new concept that is CU4. for AX 2012 R2 upgrade CU4 will come in picture which is mandetory for the AX 2012 r2.


Step 1. Install all components Except DB



 

 






Step 2. run schema command on the DB

 

  Step 3. run CU4 installable and check DB only 


 

 Step4. Select start the S/W update check list and complete it

Step 5. below is the check list which should complete successfully



Step 6. At last check the version and installed model it should match to the CU4 one.


Wednesday, May 22, 2013

How to install and configure AX 2012 dynamics connector


How to install and configure AX 2012 dynamics connector
1.       Install Business connector XPO
2.       Merge the code if any error occurred
3.       Run the class dynamics connector
4.       Check the dynamics connector default service in the inbound port it should activate
5.       Open connector
6.       Adapter setting
7.       Click on refresh services button
8.       Check all services along with connector services
9.       Click on configure button

Dynamics CRM Connector error

Error: value cann't be null. Parameter name:type


Occurrence: This error occurred while we try to configure services through connector.
Reason: This error occurred if we have checked customized document check box but not select any data policy in the inbound port.
Solution: cleared check box as shown in the screen shot.


Dynamics Connector error in AX 2012

Error: An Exception of type MataDataException has occured while performing the operation


Occurrence: This error occurred and we try to refresh services in dynamics connector adapter.
Reason: This error occurred while any objects not have reference. In our case we have uninstalled RF Smart. But some objects have left to delete. And they have no reference.
Solution: Delete unreferenced objects( for track that object browse file in C:\ProgramData\Microsoft Dynamics\Connector for Microsoft Dynamics\Logs).