cancel
Showing results for 
Search instead for 
Did you mean: 

Authorizations for the Status drop down on Batch Details

Former Member
0 Kudos

Hi Experts,

Is it possible to create permissions/ authorizations for the Status drop down on Batch Details window?

Thanks in advance.

Regards,

IC

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

B1 has only form level authorizations. System has no direct support to create permissions/ authorizations for the Status drop down anywhere.

Thanks,

Gordon

Former Member
0 Kudos

Thanks Gordon. Can a program be written to do this setting? For example: "If user id in ('jp', 'dg') do not allow to 'Update' OIBT.Status"

Regards,

IC

Former Member
0 Kudos

Try SDK to program whatever you like to restrict. You may post it on SDK forum.

Former Member
0 Kudos

Hi Ian,

You could use stored procedure like this


IF @object_type='10000044'AND @transaction_type='U'
  BEGIN
	SELECT @error=-1
	SELECT @error_message='Update denied'
  END

However, it seems that you want to protect this action only for certain user?

I think it is not easy (unless you're using SDK).

The problem is, the OBTN table (OIBT only a view) only store the original user who create the batch (field UserSign). So, if user "A" create the batch, and later user "B" want to update it, but you intend to restrict only user "B" while giving access to update the status to user "A", the table OBTN still record the UserSign field with user "A" despite it was actually "B" who update it. So, stored procedure can't read that it was "B" who actually tried to update the batch detail.

Maybe you could use this workaround, you create an UDF in batch object (U_User), and using FMS to update this UDF with active user who login to B1. Therefore, you could amend above stored procedure like this


IF @object_type='10000044'AND @transaction_type='U'
  BEGIN
	DECLARE @U_User AS NVARCHAR(10)
	SELECT @U_User=U_User FROM OBTN WHERE AbsEntry=@list_of_cols_val_tab_del
	IF @U_User IN('1','2','3') -- from USERID field in OUSR table
	  BEGIN
		SELECT @error=-1
		SELECT @error_message='Update denied'
	  END
  END

Frankly, I haven't try it. Hope this help.

Best Regards,

Hendry Wijaya

Former Member
0 Kudos

Hi Hendry,

The second solution looks interesting logically. I don't know why but I think, it will work. And, even if we fail, I will try it.

Thanks

IC