I got this BP warning:
BP Rule: [BPUpgradeCodeLateBoundCall]:A late bound call type.Id is made. In source system (AX 2012) it is possible to dynamically call methods where the number and type of the parameters does not match with the method definition. This is not supported in AX 7, where the number and types of parameters have to match. Even if the parameters do match, the late bound call is extremely expensive. Mitigation: Use a class or interface hierarchy to provide a type safe fast call, or use the IS and AS operators to cast to a known type before calling.
Here's the code for a table method
public static List getAllXX(AccountNum _accountNum, NoYesId _extra = NoYes::No)
{
Table1 table1;
Table2 table2;
Table3 table3;
Table4 table4;
Object type;
List r = new List(Types::Class);
while select table1 where table1.AccountNum ==_accountNum
join table2 ...etc
{
if(table1)
{
if(_extra)
{
type = new classContractXExtra();
type.DOverride(table4.DOverride);
}
else
{
type = new classContractX();
}
type.Id(table3.Id);
type.Id2(table2.Ids);
type.TypeId(table3.DType);
r.addEnd(type);
}
}
return r;
}
i got the error for type.Id, type.Id2, type.TypeId and type.DOverride
can someone explain the error? why i'm getting it? and what do i need to do exactly?