I'm trying to make a User Business Class in HR Talent to track some information for Benefit brackets that will be used for custom IPA flows.
I've got user fields I need to create and surface within the Employee BC, but one of those fields will contain a calculated value of employee's pay from the past 12 months and we need to restrict who can see that data. If this field gets created directly in Employee, I'll need to hunt down and extend a great many security classes that have "all actions" or "all inquiries" to the Employee business class and create extensions.
I'm hoping I can instead have this data live in a User Business Class. I so far have created the UBC with the keyfield defined as numeric 1 with States 1 through 7 and the labels as Bracket1, Bracket2, etc… I then have an EarningsAmount field.
My goal is that on LRCEmployeeBenefitHRForm will host a field as the type of my UBC and then display the EarningsAmount attached to that.
Here's what I've got for code:
Business Class itself:
RHREmployeeBenefitBracket is a BusinessClass
prefix is cfg
Ontology
symbolic key is RHREmployeeBenefitBracket
Persistent Fields
EarningsAmount is Decimal size 8.2
Key Field:
RHREmployeeBenefitBracket is a KeyField
Representation
type is Integer size 1
States
Bracket1 value is 1
Bracket2 value is 2
Bracket3 value is 3
Bracket4 value is 4
Bracket5 value is 5
Bracket6 value is 6
Bracket7 value is 7
Ontology
business class is RHREmployeeBenefitBracket
Context Employee
Field Rules
Employee
no duplicates
I'm having a few snags:
1) I want the record to create in my UBC when a selection is made on the form in Employee
2) I want to prevent more than one record with the same Employee in the UBC, but right now it's letting me create a record with State 3 and then another with State 4 without any errors.
Anyone ever tried to do anything similar?