@Kevin Moyes I probably have something wrong still. I put in Debug so that I could see what the security value was and it returned blank
retAllowed = oSession.AsObject(oSession.Security).IsMember ("RENTAL")
retVal = oScript.DebugPrint("Rental Member Value: " & sRENTAL)
if retAllowed = oSession.IsMember (sRENTAL) then
Exit Sub
End if
'put in exclusion for RENTAL security role so Mike M wouldn't get Error 95 when issuing rental items for shipping

------------------------------
Jane Scanlan
Partner
Next Level Manufacturing Consulting Group
------------------------------
Original Message:
Sent: 11-10-2022 15:57
From: Kevin Moyes
Subject: Security Role and Scripting
retAllowed = oSession.AsObject(oSession.Security).IsMember("rolename")
Will return a value > 0 if user belongs to specified security role or 0 if not a member.
New method (to stop error 88's during role check…). Not sure what version this was added:
retAllowed = oSession.IsMember(sRoleName)
------------------------------
Kevin Moyes
Technical Systems Analyst
Munjal White Consulting Co.
------------------------------