Hey guys,
I am fairly new to AX, and so far have worked on Extensions. This is my first try to build tables/form from scratch. I created to two Table LeavePlan and LeaveDetail and have added them to LeavePlan Form as FormDataSource. The tables are related as LeavePlan.RecId = LeaveDetail.LeavePlan. Both form datasource property InsertIfEmpty is set to No, LeaveDetail has the JoinSource property set to LeavePlan with LinkType Active (also tried Passive/Delayed/InnerJoin). The problem arises when running the form and I want to create a New record via CTRL+N or New button in ActionPane. It only creates record for LeavePlan (enables it's field controls on the form whilst LeaveDetail field controls are all still disabled). I tried overriding the createRecord function as
public void createRecord(str _formDataSourceName, boolean _append = true) { str detailDataSourceName = formDataSourceStr(LeavePlan, LeaveDetail); super(_formDataSourceName, _append); super(detailDataSourceName, _append); }
and
public void createRecord(str _formDataSourceName, boolean _append = true) { super(_formDataSourceName, _append); LeaveDetail_ds.create(); LeaveDetail_ds.initValue(); }
In any case, the record wasn't created for LeaveDetail, and its fields are all disabled on the form even after clicking the New button in action pane. I even tried overriding task and It still didn't work. How do I resolve this issue?