This small article will provide you an example to personalize the LOV on a form. I have chosen the GL journal entry for this example. With this example i am going to personalize the LOV for journal category on the journal entry form. This personalization will restrict seeded category to appear in the LOV for journal category. Following are the steps :-
Go the enter journal form.
Help > Diagnostics > Custom Code > Personalize
It will ask you enter the Oracle password. After entering the oracle password you will get the form personalization window.
Put a sequence number say 1 in the sequence column. Enter the brief description of the personalization, say "Disabling seeded categories from the category LOV". Choose level as "function".
Navigate to the conditions tab. Choose "WHEN-NEW-ITEM-INSTANCE" as trigger event and trigger objects as the field name which in this example will be "HEADER.USER_JE_CATEGORY_NAME". Choose processing mode as "Both" i.e. for both enter and query mode on the form. If you want, you can restrict this personalization on "User","Responsibility" or "Site" level. In this example i am choosing the default option ie. "Site". Save the changes.
Navigate to the second tab i.e "Actions". In the sequence field , put value as "1" and type as "Bulletin". Choose the bulletin type as "Create Record Group from Query". In the argument put the modified query. Please make a note that you need to get the default query for the LOV first by enabling the "Trace with binds". E.g : I got the following querying from the trace
"Select je_category_name,user_je_category_name,description from gl_je_categories order by user_je_category_name"
"Select je_category_name,user_je_category_name,description from gl_je_categories where createdy_by <> '1' order by user_je_category_name"
Enter a default group name E.g. : "TEST_FOR_CATEGORY". Now make another entry in the sequence field say "2", choose type as "Property", Object Type as "LOV", Target Object as "USER_JE_CATEGORY_NAME", Property Name as "Group Name" and Value as "TEST_FOR_CATEGORY" which you used as group name for first sequence. Save the changes and click "Apply Now". You are done and you can validate the output of the Category LOV on the journal entry form.