What's New - SSM 5.4 SRC Improvements: When you delete a service from the catalog, you can now select to either Re… https://t.co/y5VzONs9c0
Here is what I have
If (TransitionID = 361) Then
Dim strEmergencyApprovers, intDeveloper, strSecondaryOwner, strNewComposedvalue
intCurrentUser = Shell.User.GetId()
fldOK = Shell.Item.SetFieldValue("Developer", intCurrentUser)
fldOK = Shell.Item.GetFieldValue("Developer", intDeveloper)
fldOK = Shell.Item.GetFieldValue("Emergency Approvers", strEmergencyApprovers)
fldOK = Shell.Item.GetFieldValue("Secondary Owner", strSecondaryOwner)
strNewComposedValue = "," &strEmergencyApprovers &"," &intDeveloper&","
fldOK = Shell.Item.SetFieldValue("Secondary Owner", strNewComposedValue)
' End of Secondary Owner adding Developer for Emergency during Request Emergency Approval
Accepted AnswerEmployeeDon InghramOnline0Trying to add values directly to the system Owner or Secondary Owner fields is a bad idea, because every time the item is updated, SBM will overwrite the value you manually set to the field with the value it is supposed to be (from the field that the state uses to define the value).
Rather, the way I'd suggest doing this is by using a Multi-User/Group field to drive the Secondary Owner for this state. Multi-User/Group fields can store Users, Groups, or both. These values can be copied to the Secondary Owner field by the SBM ownership mechanism.
Accepted AnswerPaul ThompsonOffline0Bob:
In addition to Don's suggestion, your code sets the Developer field to the current User's ID, then get's that field (which is now the current User) to append it to the strNewComposedValue string. I think you want to reverse the order of those 2 operations. Then (as per Don) use that to set the field specified in Composer as the Secondary Owner.
You probably want to ensure that in Composer the "Selection Mode" for your "secondary owners" and "Emergency Approvers" fields are similar. This has to do with multi-user fields that contain a mix of user IDs and Group IDs, where the Group ID is prefixed with a "G".