How to default BU and DEPT with requestor's BU and DEPT in New Positions page ?
Summary:
Hi Experts,
We are trying to default the Business Unit and the Department in the Request a new Position page, as per the requestor's BU and Department.
Able to capture requestor's Id/Name. but not sure how to capture the requestor's Assignment data like BU, DEPT , Location etc.
Tried capturing like below but didn't work.
$fields.positionsV2.BusinessUnitName.$initialValue()
$fields.positionsV2.BusinessUnitId.$initialValue()
We are trying to replicate something like the below Groovy script in the VBS business rule through Advanced Expression -
Capture requestor's assignment details and then the BU,
def personId = adf.context.getSecurityContext().getUserProfile().getPersonId()
def assignment = new PersonAssignmentUtil().getPrimaryAssignment(personId)