If we do not use required field property and we need to highlight a required field on a page, we need to use peoplecode on saveedit event as below:

Setcursorpos(%Page):It is to position the cursor to the required field in a specific page.

Style = “PSERROR”: Property which turns the field into Red color which is the default behavior of an error message;

If (conditions) Then
 Recordname.Fieldname.Style = “PSERROR”; 
   &error1 = MsgGetExplainText(25, 18, “Message not found”);
   &error1 = MsgGetExplainText(99999, 1, &error1); /* 99999,1 should not have any text*/
   Error (&error1);