axapta - Using the super method -


i want program method super() in dynamics ax2012.

i have build class ("a") , methods in it. build class("b") whhich extends class before.
class "a" has methods. in class "b" want override method. so. override method gettable().

protected syccarbrandtable gettable() {     syccarbrandtable ret;      ret = super();     {         select brandid,branddescription ret         ret.brandid == "bentley";     }      return ret; } 

now question is...

i have understood super() new method did take it, method extended in motherclass "a".

but how can add more things method, gives me things method before , things have added in overriden method ?

looking @ implementation of gettable(), looks may want select syccarbrandtable record using values of syccarbrandtable returned super() criteria + other newly added criteria.

i not sure why such thing, if perform select statement upon same table variable, overriding behavior, not adding anything.

if got right, may want use syccarbrandtable:

protected syccarbrandtable gettable() {     syccarbrandtable supercar;     syccarbrandtable ret;      supercar = super();      select brandid,branddescription ret         ret.criteriaa = supercar.criteriaa         && ret.brandid == "bentley";      return ret; } 

then again, i not sure why such thing useful, 1 sample way of aggregating functionality instead of overriding it.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -