Hi all,
I am trying create a many to many relationship between change order and change order itself.
The Doc from cdtj helps, but I am stuck at modifying the htmpl files.
Here are what I did so far:
- Create a lrel table z_lrel_chg_chg
- field 1: parent
- field 2: child
- Add two fields to table chg
- field 1: z_parent
- type: BREL
- table: z_lrel_chg_chg
- BREL Query Information: parent { LREL child; }
- field 2: z_child
- type: BREL
- table: z_lrel_chg_chg
- BREL Query Information: child { LREL parent; }
- Update HTMPL
- list_chg.htmpl
- Added
var enableExtraBtn = true;
cfgExtraButton = new Array("Update LREL", "zCreateNew()", enableExtraBtn);
function zCreateNew() {
update_with_lrel_style('chg', ahdframe.argPersistentID, 'chg', 'z_child', 'Change', 'Added Change', '', 'KEEP.ForChild=1+KEEP.exclude_chg_ref_num=1');
}
- detail_chg.htmpl
But in the detail_chg tab, I would have a normal list of change order instead of list of child change and the 'Update LREL' is missing.
Best regards,
Conan