PCG 7.3.3: Button not enabled in Form rule
Last updated on AUGUST 26, 2016
Applies to:Oracle Preventive Controls Governor - Version 7.3 and later
Information in this document applies to any platform.
On : 7.3.3 version, Form Rules
We have created a Form Rule for validating invoices which are not two-way match after adding attachments. In this rule we have used the SQL tab and have prepared a query for the same. As per this query the "OK" button is disabled if a user tries to validate non 2-way match invoice without an attachment. The query is working as expected with the only defect that after cancelling the Actions window the form should be refreshed and user should be able to use other functions on the Actions tab. But the "OK" tab once disabled is not enabled automatically. For enabling it user has to close the Invoice Workbench form and open it again. This is a bit less user-friendly and may create confusion. Is there any way we can refresh the "OK" button in Actions tab?
The OK button has to be refreshed once the event is fired.
The issue can be reproduced at will with the following steps:
1) In the Form Rules form select the Form Rule and its element.
2) Follow the steps below -
1. In the Event field, replace the value Event Tracker with Select When New Item.
2. Select the block in the Block Name field. It shows values captured by the Event Tracker. Select "INV_SUM_ACTIONS" from the LoV.
3. Debug - Causes Form Rules to display messages as the rule is being run. Uncheck it.
4. Active - Check to activate the rule element.
3) Click on the Details button to the bottom right corner. Select the SQL tab.
4) Follow the steps below -
1. In the Sequence Num field, type a number: 10
2. In the Procedure Name field, type a name for the SQL statement - Validation Activity
3. Ensure that the Active check box is selected to use the statement.
4. The SQL Text field displays a template. Replace the template entirely with following statement - l_invoice_num varchar2(50);
l_invoice_num := name_in('INV_SUM_FOLDER.INVOICE_NUM');
FROM ap_invoices_all a, apps.fnd_attached_documents b
WHERE a.invoice_num=l_invoice_num AND
((a.po_header_id IS NOT NULL) OR (a.invoice_id = b.pk1_value));
if l_invoice_count>0 then
fnd_message.set_string('Validation passed for Invoice:' || l_invoice_num);
set_item_property('INV_SUM_ACTIONS.OK_BUTTON', ENABLED, PROPERTY_FALSE);
fnd_message.set_string('Add attachment to the Invoice by navigating to Menu bar and clicking on View > Attachments');
5) Click on the Compile All Active SQL Rules button. A concurrent request runs to compile the code. A message informs you of its identification number. Make a note of the number and click on the OK button to close the message.
6) Save the rule and test it in EBS.
The issue has the following business impact:
Due to this issue, user feels that it is not user friendly.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms