Unable to cast object of type 'Dynamics.AX.Application.CustTable' to type 'Dynamics.AX.Application.smmBusRelTable'.
I think so the casting code here is possibly giving error.
[ExtensionOf(formDataSourceStr(DirPartyQuickCreateForm,DirPartyEntity))]
final class DirPartyQuickCreateForm_DirPartyEntityDS_Extension
{
public void initValue()
{
//FormDataSource DirPartyEntity_ds = this;
//smmBusRelTable DirPartyEntity = DirPartyEntity_ds.cursor();
next initValue();
}
}
For reference some more code:
[FormControlEventHandler(formControlStr(CustTable, CustCommodities_ItemNameAlias), FormControlEventType::Lookup)]
public static void CustCommodities_ItemNameAlias_OnLookup(FormControl sender, FormControlEventArgs e)
{
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(CustomerCommodities), sender);
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
;
queryBuildDataSource = query.addDataSource(tableNum(CustomerCommodities));
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(CustomerCommodities, ItemNameAlias));
sysTableLookup.performFormLookup();
FormControlCancelableSuperEventArgs cancelableSuperEventArgs = e as FormControlCancelableSuperEventArgs;
cancelableSuperEventArgs.CancelSuperCall();
}