How to hide relate field peoplecode

How to hide relate field peoplecode

Hide relate filed peoplecode in level 0

&fldCtrl = GetRecord(Record.PERFNW_RUN1).GetField(Field.EMPLID);
&fldRelated = &fldCtrl.GetRelated(EMP_NAME.DESCR100);
&fldRelated.Visible = False;

Hide relate filed peoplecode in level 1

Local Rowset &rsLvl1 = GetLevel0()(1).GetRowset(Scroll.CNTRC_TRAN);
Local Field &fldCtrl, &fldRelated;rem loop through each row in the grid;

rem WinMessage(&rsLvl1.ActiveRowCount, 0);
For &j = 1 To &rsLvl1.ActiveRowCount;

rem get the control field;
&fldCtrl = &rsLvl1(&j).GetRecord(Record.CNTRC_TRAN).GetField(Field.EMPLID3);

rem now get the related display field;
&fldRelated = &fldCtrl.GetRelated(EMP_NAME.DESCR100);
WinMessage(&fldRelated.Value, 0);

&fldRelated.Value = “”test_related_feild””;

&fldRelated.Visible = True;

End-For;

Posted in Peoplecode.