Meaning of super()

public void executeSection()
{

str transferId;

A_Qty = 0;
B_Kg = 0;
C_Kg = 0;

if(transferId != InventTransferJour.TransferId)

{
transferId = InventTransferJour.TransferId;

select sum(QtyShipped) from _inventTransferJourLine
where _inventTransferJourLine.TransferId == InventTransferJour.TransferId &&
_inventTransferJourLine.ItemId == ‘A’;
{
A_Qty = _inventTransferJourLine.QtyShipped;

}

select sum(QtyShipped)from _inventTransferJourLine
where _inventTransferJourLine.TransferId == InventTransferJour.TransferId &&
_inventTransferJourLine.ItemId == ‘B’;
{
B_Kg = _inventTransferJourLine.QtyShipped;

}

select sum(QtyShipped) from _inventTransferJourLine
where _inventTransferJourLine.TransferId == InventTransferJour.TransferId &&
_inventTransferJourLine.ItemId == ‘C’;
{
C_Kg = _inventTransferJourLine.QtyShipped;

}

total_B_Kg += B_kg;
total_C_Kg += C_kg;
total_A_Qty += A_Qty;

if(A_Qty)

super();

}

whats the meaning of Super() here?

Hi Pratham,

Please try to ask proper question, i mean to say where you are using this code…

and what you are trying to do with that…

please specify subject correctly. so that any user who sees it can understand it…

1 Like

Hi,

super() used together with inheritance. Calling super() means calling a method with the same name in a parent class. The parent can be a normal class in X++ (then you can navigate to it in editor and debugger), or it can be a kernel call, e.g. when you call super() in insert() method on tables.

thanks sir…

Hi,

Basically we can use super() in terms of inheritance.It is nothing just a parent call from a child method. For better go through the examples, please go to following link:

http://axpedia.blogspot.in/2013/01/super-method-in-ax-2012.html

:slight_smile: thanks