- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi!
We have been trying to automate more and more of our SPM, and we have come across a few issues.
Currently we have tried to automatically set the employee_type for all created employee profiles to Internal.
A simple business rule was created, that sets the employee_type to Internal as an action, when an employee profile is inserted.
This business rule works, when an employee profile is created manually. However, when the scheduled job that creates employee profiles from user data is used, this business rule no longer works.
the scheduled job that is used is the following one:
Generate Employee Profiles from Users
As mentioned, the business rule is a very simple one, on insert into the sn_employee_profile table, set employee_type to internal.
Any ideas what could be blocking the business rule from triggering when the scheduled job runs?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I chased the rabbit and found setWorkflow(false) in the ep_UtilsSNC script on line 114, within an IF statement so that it's only triggered when the createEmployeeProfileFromUser function is called with the second argument = true. This function is called from the ep_generateEmployeeProfileUtilsSNC script on line 90, with the second argument = true. So now you have to ask yourself why they did this in the out of box script, but with the override capability. If you don't find any other Business Rules that would be harmful to run in this situation, you can override the function that this call is in via the ep_generateEmployeeProfileUtil script include.
You could also set a default value of internal on the employee type field, only changing it to external when appropriate via manual creation, import, or however any other employee profiles are getting created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
how did you automate generation of employee profile - Is there out of box business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
From what I can see, this Scheduled Job is an ootb job
Generate Employee Profiles from Users