I'm troubleshooting a weird issue with the "Create User" form and the business rules behind it. The error that's being returned is that the "Company" property doesn't meet the following contstraint: must be one of: "CompanyA" or "CompanyB". The weirdness is that the error only occurs for a single Office value in a list of multiple values.
Some additional details:
-
The Create User from sets "CompanyA" as the default value when the form is opened.
-
In addition to the "Company" User Pattern, we're also setting the "Office" information which updates the account's address information.
-
For the "Office" selection, the business rule iterates through an "If - ElseIf" for multiple office values. For example:
If the operation succeeded AND
the "Office" property equals "Location1" then
modify the user: [set the L2 address information]
Else if the "Office" property equals "Location2" then
modify the user: [set the L2 address information]
Else if the "Office" property equals "Location3" then
modify the user: [set the L3 address information]
And so on, through many other office locations.
Other office locations in this "If - ElseIf" logic complete successfully, with no error and the address is populated. For example, let's say that "Location5" is the location that throws the error. If I create an account with "Location4" or "Location6", the account is created and the address information is populated.
In addition, when I hover over/view the specific "Create" event in the logs I can clearly see that the "Company" value is being set with the "CompanyA" value.
I'm really having a hard time understanding why this one value would fail. Thoughts?
Thank you,
-Todd