Hello All,
I have seen a lot of requirement where the customer wants to default the standard entities value (Job Information, Compensation information etc.) to Custom MDF object. Below is the configuration to achieve this requirement.
Requirement:
Default the value of Job title, Standard Weekly Hours from Job Information, Hire Date from Employment Details, Is Eligible for Benefits from Compensation information and First Name from Personal Information to MDF object named cust_test_mdf.
Create a Custom MDF object and change the Data Type of 'externalCode' field as 'User. Five custom fields have been created. (cust_MDFJobTitle, cust_MDFHireDate, cust_MDFStandardWeeklyHours, cust_IsEligibleforBen, cust_firstname). Make all the fields as Read Only field.
Configure a screen for this object. Navigate to Manage Configuration UI > Select Base object as MDF object you created (cust_test_MDF) > Input the ID and Save it.
Navigate to Configure People Profile > Search for 'Live Profile MDF Information' > Drag and Drop the block and Select the screen created in the above step.
Configure a business rule. Navigate to 'Configure Business Rule' > MetaData FrameWork > Click on Rules for MDF Based Objects. Input the Rule Name, Rule Id, Base Object (MDF object - cust_test_mdf), purpose as 'Evaluate'
'IF' condition is always True. 'THEN' Condition will have fields from MDF to be equal to the field from the standard entity. Kindly note - the navigation of standard entity in the rule will be MDFobject.externalCode.StandardEntity.Field (as highlighted in Green).
The rule is attached as 'onChange' in Object Definition > cust_test_mdf >
effectiveStartDate > Details > Attach the Rule.
To Test the rule and configuration, check users information. Below is the user's information from my demo instance.
Job Title - HE Business Partner Saudi Arabia.
Standard Weekly Hours - 40
Hire date - Jan 01, 2013
Is Eligible for Benefit - No
First Name - Omar
Navigate to the screen which you created in People Profile and click on the Edit button (Pencil Icon)
Once you click on Edit icon, automatically the page the will load and the data from various portlets will be populated.
You can also test the same by Navigating to Manage data > New > Object Name (cust_test_mdf) > Select the user in external code field > Select the date. The fields will automatically get populated.
Regards,
Dharmin Thakkar