Monday, December 11, 2017

Making all the Field on the Page Display Only through Peoplecode


People code for the Level 0 field to be display only


   Local number &j, &i;
      Local Rowset &Rs = GetLevel0();
      For &i = 1 To &Rs(1).RecordCount
         Local any &Rec = &Rs(1).GetRecord(&i);
         For &j = 1 To &Rec.fieldcount
            &Rs(1).GetRecord(&i).GetField(&j).DisplayOnly = True;
         End-For;
      End-For;
      DERIVED_HR_FL.CANCEL_BTN.DisplayOnly = False;
   End-If;