2 of 2 people found this helpful
If I understand you well, you want to be able to link an Employee’s Org Unit using the OrgUnit.SAPID in the Employee csv import file. If this is right, then you can achieve this through a search and link trigger business rule. But before creating this rule, there are some configurations involved as described below:
- Create 2 text fields in the Employee object: "OrgUnitSAPId" (which will contain the value from the OrgUnit.SAPId from the import file) and "OrgUnitSAPRecId" (which will contain the recid of the Org Unit). You can make these fields Unicode text fields so that you can see the pick lists which we will create below).
- Create 2 pick lists; OrgUnitSAPRecId:
3. Go back to the fields you added in Employee and validate them with the above pick lists as shown below:
4. Navigate to your picklist “OrgUnitSAPRecId” and modify the value field to “RecId”. This is a trick to allow a pick list to store number values.
5. Add an editing business rule in Employee as below:
This business rule is used to set the Org Unit's rec id when the OrgUnitSAPId is updated. You will have to type the expression $([OtherObject]RecId) as the RecId is hidden.
6. Create your search and link trigger business rule in Employee as shown below:
The first composite action called "Search and Link Employee's Org Unit" will be a search and link which will be defined as follows:
Note: You will have to select the right relationship which has been defined on the field OrgUnitLink on Frs_CompositeContract_Contact. You can check this by going to this field to check the relationship which has been set:
The second composite action called "Clear fields" will be an update to clear the fields OrgUnitSAPId and OrgUnitSAPRecId. This is done so that the next import will set these fields and fire the business rules.
Make sure that in the import mapping, you map the OrgUnit.SAPId in the import file to the field OrgUnitSAPId in Employee so that the various business rules which you added in Employee will fire and set the Employee's right Org Unit.
Hopefully this is what you are trying to achieve and it helps you. Let me know if you have any questions or issues.
thank you very much for your very detailed answer. This is very helpful.
Glad it helped you.