Skip to main content

Posts

Showing posts with the label super

How to Filter Records in form from Combo box in Axapta

Lets you want to to Filter Records in form from Combo box in Axapta then this is sample example you need to create one method like this. WMSPickingRoute_ds.filter(fieldNum(WMSPickingRoute,ExpeditionStatus),queryValue(God_expeditionStatus.selection())); Then you can call that method in modified field method for that combo box. Like filter1 is method name then you can call it below way. public boolean modified() { boolean ret; ret = super(); this.filter1(); return ret; } I hope you get and Idea how to filter records for form in axapta.

Inheritance in MSD axapta

Inheritance in axapta One of the central concepts of object-oriented programming is the possibility to inherit functionality defined at a higher level in the system. This can be done by having a class hierarchy where a method in a subclass overrides a method in the super class (higher level). The method in the subclass can still use the functionality in the same method in the super class by using the super function as in this example: public void sellCar() { ; super(); } This method implies that the class that the method belongs to, extends another class where the functionality in the method sellCar is already written or that the sellCar method is defined at a higher level in the class hierarchy in which this class belong. In our example, we have a super class called Car that extends Object, and then we have we have Car_Economy, Car_Compact, Car_MidSize and Car_Luxury who all extend the class Car. Also, they override the toString method for all of these classes as shown in

Use of query elements in report using axapta

public boolean fetch() { QueryRun qr; QueryBuildRange rangeTransDate; Boolean ret; qr = new QueryRun(element); rangeTransDate = element.query().dataSourceTable(tablenum(CustTrans)).addRange(fieldnum(CustTrans, transDate)); rangeTransDate.value(queryRange(systemdateGet()-daysBack, systemDateGet())); rangeTransDate.status(RangeStatus::LOCKED); element.design().caption(strfmt("%1, %2", element.design().caption(), rangeTransDate.value())); if (qr.prompt() && element.prompt()) { while (qr.next()) { custTable = qr.get(tableNum(CustTable)); custTrans = qr.get(tableNum(CustTrans)); if (!custTable) { ret = false; break; } if (qr.changed(tableNum(custTable))) { element.send(custTable, 1); } if (qr.changed(tableNum(custTrans))) { element.send(custTrans, 2); } } ret = true; } else ret = false; return ret; }