Hi all,
In IFS Apps 10 we used an Event Action (PL/SQL) to block users without the IFSFULL role from changing specific fields (e.g., switching off Project Unique Procurement or enabling Project Access).
In IFS Cloud, since Event Actions are no longer recommended, we are asked to use Workflow.
However, Workflow seems to be approval-based and does not support immediate blocking validation.
Is there a way to enforce this kind of role-based restriction using Workflow, or what is the best practice in IFS Cloud to achieve similar behavior?
Thanks
The event action code.
DECLARE
check_access_ NUMBER := 0;
CURSOR check_access IS
SELECT COUNT(1) FROM ifsapp.fnd_role_role t
WHERE t.granted_role = 'IFSFULL'
AND grantee = '#USER_ID#';
BEGIN
IF '&OLD:ROWSTATE' != 'Initialized' THEN
OPEN check_access;
FETCH check_access INTO check_access_;
CLOSE check_access;
IF check_access_ = 0 THEN
IF '#USER_LANGUAGE#' = 'nl' THEN
Error_SYS.System_General('ERROR: Het is niet toegestaan om “Projectunieke inkoop” uit te schakelen en/of om “Projecttoegang actief” in te schakelen.');
ELSE
Error_SYS.System_General('ERROR: It is not allowed to swith off the "Project Unique Procurement" and /or to switch on the "Project Access".');
END IF;
END IF;
END IF;
END;