on 02-20-2010 6:18 AM
Hello Experts,
Please guide me how to make Accounting Tab and Tax Tab of A/R Invoice screen invisible for certain user??
Hi Divya
As per what rupinder has said determine list of user that do not have authorisation to view these tabs, then you can use the code below:
If UserAuth <> "Y" ' where userauth is boolean/char value that specifies authorisation for view Accounting and Tax tabs
If pval.FormTypeEx = "133" And pval.BeforeAction = True Then
If pval.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then
objForm.Items.Item("2013").Visible = False 'Tax
objForm.Items.Item("138").Visible = False 'Accounting
End If
End If
End If
Regards,
Aris
Edited by: aris_johannes on Feb 22, 2010 7:35 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divya,
Using the USer Defined Field Management, create a Field(UserAuth) in User Master of type Alpha with Valid values "Y"/"N".
The before running the above code, use the SAPBobsCOM.recordset object to query the database where usercode = oCompany.Usercode.
you will have to write the above code in the oApplication_Itemevent block.
For further details you can check the samples in: C:\Program Files\SAP\SAP Business One SDK\Samples path on you local hard disk if you have installed SBO SDK.
Hope this helps.
Regards,
Aris.
Edited by: aris_johannes on Feb 22, 2010 12:54 PM
Hi
As Aris said add the UDF in master data of user.on a form load event write the query to check autorization as follows
orecset(" select U_Auth from OUSR Where USER_CODE='"& oCompany.UserCode &"' ")
if orecset.fields.item(0).value="Y" then
me.oForm.items.item("tab1").visible=False
else
me.oForm.items.item("tab1").visible=True
endif
hope it helps
Regards
Rupinder
Dear
You have to finialize the list of users first for whom you want to hide the accounting tab and tax tab. From Company object you can find that which user is login and on form load of A/R invoice you can check that if login user has permission to check the accounting tab and tax tab or not els eyou can hide that.
Regards
Rupinder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.