Friday, November 10, 2017

FORM_SUCCESS in Oracle Forms



Returns the outcome of the action most recently performed during the current Run form session.

Use FORM_SUCCESS to test the outcome of a built–in to determine further processing within any trigger. To get the correct results, you must perform the test immediately after the action executes. That is, another action should not occur prior to the test.

Note: FORM_SUCCESS should not be used to test whether a COMMIT_FORM or POST built–in has succeeded. Because COMMIT_FORM may cause many other triggers to fire, when you
evaluate FORM_SUCCESS it may not reflect the status of COMMIT_FORM but of some other, more recently executed built–in.

A more accurate technique is to check that the SYSTEM.FORM_STATUS variable is set to ’QUERY’ after the operation is done.

Example:
/*
** Built–in: FORM_SUCCESS
** Example: Check whether the most–recently executed built–in ** succeeded.
BEGIN
/* ** Force validation to occur*/
Enter;
/* ** If the validation succeeded, then Commit the data. ** */
IF Form_Success THEN
Commit;
IF :System.Form_Status <> ’QUERY’ THEN
Message(’Error prevented Commit’);
RAISE Form_Trigger_Failure;
END IF;
END IF;
END;

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)