![]() |
#1 |
Участник
|
Inside Dynamics AX 4.0: RunBase Framework Extension Part IV
Источник: http://feeds.feedburner.com/~r/Insid...n-part-iv.html
============== Continue from Part III Adding Constructors As mentioned earlier in this chapter, X++ does not support method name overloading, and you should avoid using default parameters on constructors. You must create individually named new methods with different parameter profiles instead. In the preceding example, you created an instance of the class and set the necessary parameters. Imagine that there is one more parameter in your class that indicates a certain customer account number for creating bike offers. Add a new member variable to the class declaration, and then add the new parameter method, like this. ![]() ![]() ![]() ![]() Adding a query to the business operation class allows the user to select a range of targets to apply the operation to, such as sending bike-tuning offers to selected customers. To use the query, you must be able to create an instance of QueryRun. Start by adding QueryRun as a member variable, as shown here. ![]() To initialize the QueryRun object, override the initParmDefault method, as shown in the following code. This method is called by the RunBase framework if no saved object state is found by the SysLastValue framework via the unpack method. ![]() ![]() ![]() ![]() ![]() The Create Bike-Tuning Offers dialog box with an embedded query ![]() ![]() Typically, you will want to execute business operation jobs on the server tier, because these jobs almost always involve several database transactions. However, you want the user dialog box to be executed on the client to minimize client/server calls from the server tier. Fortunately, the RunBase framework can help you run the dialog box on the client and the business operation on the server tier. To run the business operation job on the server and push the dialog box to the client, you should be aware of two settings. On the menu item that calls the job, ypou must set the RunOn property to Server; on the class, you must set the RunOn property to Called from. In below image shows where to set the RunOn property of a class. The execution tier of the class set to Called from. ![]() Related Articles RunBase Framework Extension Part I RunBase Framework Extension Part II RunBase Framework Extension Part III Источник: http://feeds.feedburner.com/~r/Insid...n-part-iv.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|