Skip to main content
Solved

How to set only 2 pointed users can change Inventory Part Status from A to D, or D to A?


Forum|alt.badge.img+10

Hello All,

IFS 8, I want to control that only 2 pointed users can chang Inventory Part Status from A to D, or from D to A.  And want to apply it to pointed site.

Is it possible and how?

Best answer by eqbstal

I would prepare a user group, add the two intended persons.

Next I would prepare an event that has the status of the inventory part to trigger. If fired off, a check is there if the status is changed from A ↔ D. If so, is the user one of the persons in the user group.

If not error, if ok, accept the change.

View original
Did this topic help you find an answer to your question?

4 replies

eqbstal
Superhero (Partner)
Forum|alt.badge.img+21
  • Superhero (Partner)
  • 672 replies
  • Answer
  • July 26, 2024

I would prepare a user group, add the two intended persons.

Next I would prepare an event that has the status of the inventory part to trigger. If fired off, a check is there if the status is changed from A ↔ D. If so, is the user one of the persons in the user group.

If not error, if ok, accept the change.


eqbstal
Superhero (Partner)
Forum|alt.badge.img+21
  • Superhero (Partner)
  • 672 replies
  • July 26, 2024

Not the solution, but it gives an idea:

 

declare

  project_id_  varchar2(30);

  rev_no_   varchar2(10); 

  allowed_reg_pur_ varchar2(10);

  user_id_   varchar2(20);

  dummy     number;

  cursor get_usr_group is

    select count(0) from user_group_user

    where user_id= user_id_ 

    and user_group_id = (select user_group_id from user_group where upper(name) = 'PROJECT APPROVERS');

begin

  project_id_  := '&OLD:PROJECT_ID';

  -- Check if user is part of special  user group

  user_id_ := Fnd_Session_API.get_fnd_user;

  open get_usr_group;

  fetch get_usr_group into dummy;

  close get_usr_group;

  if (dummy = 0) then

     Error_SYS.Appl_General('General', 'ERR: You are not a member of the Project Approvers user group.' || chr(10) || chr(13) || 'You are not allowed to approve this project.');

  end if;

end;


Forum|alt.badge.img+5

Hi,

I would prepare an event action,

Assign these two users the same role and write a PL/SQL block one cursor will check Auth and count later if block check counter.

Best regard.


eqbstal
Superhero (Partner)
Forum|alt.badge.img+21
  • Superhero (Partner)
  • 672 replies
  • July 29, 2024

@nafismertapaydin Makes sense if you don't want to touch user groups (as in my example). This is a better solution as it keeps security in one type of functionality.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings