I have a Master Detail form in my apex application. Here is my Tabular Form Region Source.
select
"ITEM_ID",
"ORDER_ID",
"QUANTITY",
"PRICE",
"NOTE",
wwv_flow_item.md5(QUANTITY) "item_hash" -- set to 'hidden' in tabular form
from "#OWNER#"."ITEMS"
where "ITEM_ID" = :P2_ITEM_ID
Also I have added Page Validation as below.
DECLARE
l_error VARCHAR2 (4000);
BEGIN
FOR i IN 1 .. apex_application.g_f02.COUNT
LOOP
IF apex_application.g_f06(i) IS NOT NULL AND
wwv_flow_item.md5(apex_application.g_f03(i)) <> apex_application.g_f06(i)
THEN
l_error := l_error
|| '</br>'
|| '</br>'
|| 'Row '
|| i
|| '</br>'
|| ' Quantity Error';
END IF;
END LOOP;
RETURN LTRIM (l_error, '</br>');
END;
But when I am trying to update data in this form, I am getting below error.
Current version of data in database has changed since user initiated update process. current row version identifier = "4E8A473F53865EF8720F14022DC71E03" application row version identifier = "0ABB3E73FB3E38844974E945864ECDED" (Row 1)
How can I solve this?
Try to name your hidden item as its Table Name field.
In example:
The error says that before the update the column name has changed, and it did. You named it
item_hash
, as it differs fromQUANTITY
.