I'm trying to make an Process to limit users from having more than one resource from the IT SHOP at a time, i have four roles, so if the user already have one and asks for another, the event will trigger (Insert in PersonInOrg) and will automatically remove the resources leaving just the new one requested
The first step is the trigger, the second one is an Handle Object Component - Delete, it has two parameters, ObjectType that i filled with Value = "PersonInOrg" and a WhereClause that i filled with a code in VB but i had no success making it work
Value = "UID_Person = '" & CStr(Value("UID_Person")) & "' AND UID_Org <> '" & CStr(Value("UID_Org")) & "' AND UID_Org NOT IN ('d5ca7641-5991-4d37-9e9c-3afe471f51d8', 'bfaceda4-7c9e-496a-a290-4931c4e2bcd5', 'd700f418-da20-41ee-9918-db4b33f9a3c7', 'a22806e8-1b17-4fde-a594-273c9b8cebfc')"
how should i do? use a script? keep the handle object and change the code?