Home > Dynamics Ax > Creation of class object during the run time

Creation of class object during the run time


Depends on particular action if we want
to create the class object during the run time..

Here you can find the following code…

Here we have actions like (Warning, Question,
SendMail). Based on these actions we need to instantiate the particular class
object.

public static void getAction(ClassId
_classId)

{

   
SysDictClass                   
sysDictClass;

   
I4C_IToleranceExceptionAction  
toleranceExceptionAction;

   
InventTrans                    
inventTrans;

   
sysDictClass                = new
SysDictClass(_classId);

   
toleranceExceptionAction    =
sysDictClass.makeObject();

   
select firstonly inventTrans order by InventTransId desc;

   
toleranceExceptionAction.validateInventTrans(inventTrans);

}

Same thing we can find in standard Dynamics
Ax.

ClassesAifAdapterManageraddAdapter

In the addAdapter method based on the
Adapter class id (here also we have types of adapters like FileSystemAdapter,
Biztalk, MSMQ) the corresponding class object will be created. Here we are
using the interface called AifIntegrationAdapter.

 

Advertisements
Categories: Dynamics Ax
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: