Friday, September 4, 2009

Restrict Payment Types per Responsibility

There was a simple requirement to restrict payment types for Manual Payments for specific responsibilities. This can be achieved using CUSTOM.pll, by changing the actual form code or the simplest option is to use Forms Personalization.

You can create a new record group using custom query and then attach this record group to the LOV of the field. Here are the details

1. First Select Trigger Event 'WHEN-NEW-ITEM-INSTANCE', set Trigger Object as the item whose LOV is to be changed
2. The condition should verify that the record is in insert mode, i.e. a new record. You do not want to change the LOV values for older committed records
3. In the context, set all the responsibilities for which this change is to be reflected
4. Now coming to the actions, select "Builtin" as Type and select "Create Record Group from Query" as "Builtin Type"
5. Put your custom SQL in the Argument
6. Give name to your custom record group
7. In the subsequent action, set the LOV property "Record Group" to your custom record group
8. You can also add more actions to default the value for the item. Default to both description and lookup code.

Cheers!

No comments: