How do I setup constraint (I think) to force formatting of the phone field to "(xxx) xxx-xxxx" and warn the user if it's not?
Business Class: Employee Contact
Form: AddTelephonePagerOrFaxNumber
Field: ContactDetail.Telephone.SubscriberNumber
Thanks.
See if this doco helps Infor Documentation Library - docs.infor.com/.../default.html
taking a look ...thanks
Hello! I am currently configuring a constraint for phone entry and ran into a roadblock on where to put this constraint for the Employee Update.
Phone number format rule XXX-XXX-XXXX Here is my code:
ContactDetail.Telephone.SubscriberNumber
label is "PhoneNumber"
constraint (ContactDetail.Telephone.SubscriberNumber matches "^[2-9]d{2}-d{3}-d{4}$")
"Phone_Number_Must_Be_In_999-999-9999_Format"
I have added this code so far to:
Admin/Generalist
UPDATE: EmployeeContactUpdateFormAdmin
ADD: AdminAddTelephonePagerOrFaxNumber
Employee/Manager
ADD: AddTelephonePagerOrFaxNumber
UPDATE: ???
Adding the same to the EmployeeContactUpdateForm did not produce the same result as the first 3. I must be adding it to the incorrect place. Any direction?
Thanks,
-Kara
we have ours as an Action Configuration there within the bus class EmployeeContact
Thanks! There were 4 diff Action Configs to make sure Admin, Generalist, Manager, Employee adds and updates were caught but it did work on all now instead of doing it on the forms.
You can create an action override for the business class. In this example, I’m using the Vendor BC and the Reference1 string field to enforce a U.S. phone format. I used Reference1 just because I like that field for testing code.
Here’s the syntax I used that worked.
And if you'd like to copy and paste the syntax, here it is in text format to enforce a U.S. phone format if something was entered into a field. This would not be applicable for phone number syntax in other countries, so that's something to consider.
if (Reference1 entered)
constraint (Reference1 matches "1?W*([2-9][0-8][0-9])W*([2-9][0-9]{2})W*([0-9]{4})(se?x?t?(d*))?")
"PleaseUsePhoneFormat_111-222-3333"