Hi all,
I am trying to solve the following use case:
An Employee is associated with several Departments through PersonInDepartment. When the Employee is ordering a product from ITShop, they should be able to select one of their Departments in a drop down list. This department should then be saved to PersonWantsOrg for further use (i.e. approval by the correct manager).
Currently I have created a request property with data source PersonInDepartment.XObjectKey and condition UID_Person = '%UserUID%'. I then added code in the OnSaving Script for PersonInDepartment that parses DialogParameterSet, DialogParameter and PersonInDepartment, and populates PersonWantsOrg.UID_Department. This works, but feels like a very cumbersome approach, and i beleive two of the steps could be solved better:
1. I have PersonInDepartment.XObjectKey as DataSource in the parameter set because I get an error message if I try to use PersonInDepartment.UID_Department. In the web-frontend I get "An error occured while processing your request".
2. I feel that using the "On property changed script" in the Request Property is a more logical approach than using OnSaving script in PersonWantsOrg, but I'm not sure about the syntax here. Is it possible to use this script to populate PersonWantsOrg? Are there any example code that can help me out?
I am using One Identity Manager 9.1 and the new HTML5 based Web portal (ApiServer)