Want to force the initial value of that field

Cash Receipt Journal form (255) allows record entry into Gen. Journal Line table (81). If the user tabs through the Document Type field, it remains blank, which corresponds to value 0 for that field in the table and in the form. The validation specified in the field properties of the form are bypassed when the user presses tab. I want to force the initial value of that field in this form to Payment (value 1), which is the 2nd value of OptionString. How can I have the initial value of that field for a new record only in this form default to the 2nd value of the OptionString (1 aka Payment)? I cannot change the table because it is used in many other places where this change would be unwanted. (Attain 3.60) Thanks!

On the form, you can take a look at the OnNewRecord function!

Which in turn is calling the SetUpNewLine Function in the Gen. Journal Line Table. You can either adapt this Function or put your code directly on the Form Trigger.

LarryRR, You can try to change to properties of Form call “SourceTableView” to only allow this form to show “Payment” only. You should change the properties of field “Document Type” call “Editable” to false. If you don’t change this properties then will the line will disappear if user manully change the “Document Type” to other value.

LarryRR, The change will not allow user to change the document type (be careful)

What I found out is that I don’t yet have a license to access the C/AL code of a form. Therefore I’m not able to try your suggestions! I will try them once I have the license. Thanks, all.