FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger
Hello,
I added the following code in Custom.pll, Event procedure. When Internet Expenses responsibility is added to a user on the User form in System Administrator repsonsibility, his default account will be populated from costing. I received error, "FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger",
when enter Internet Expenses in the Responsibility field and tab. Even though the account was populated right, the responsibility is not able to save to the form.
/* When the employee id given Internet Expense responsibility, create appropriate expense account for the employee from costing */
if(event_name='WHEN-VALIDATE-RECORD') then
if(form_name ='FNDSCAUS' and block_name ='USER_RESP') then
p_responsibility_id := to_number(name_in('USER_RESP.RESPONSIBILITY_ID'));
--p_responsibility_name := name_in('USER_RESP.RESPONSIBILITY_NAME');
p_user_id := to_number(name_in('USER_RESP.USER_ID'));
if (p_responsibility_id = 22918) then
select employee_id
into p_person_id
from fnd_user
where user_id = p_user_id;
apps.cov_oie_pkg.update_emp_exp_act(p_person_id);
commit;
end if;
end if;
end if;
Any suggestion will be highly appreciated!
Yan