Rennur wrote:Add a checkbox (Y/N attribute): IsEmailCheckFailed ...
Thanks for the tip Rennur. I actually started exploring down that road as well.
After some more testing, I've been able to narrow down on the actual issue.
I found that by just using the following rule I'm able to clear the field content:
Code: Select all
If Customer.EmailAddress IS DEFINED AND Customer.EmailAddressCheck IS DEFINED AND Customer.EmailAddress<>Customer.EmailAddressCheck Then
Customer.EmailAddressCheckFailed='Yes'
Customer.EmailAddressCheck=UNDEFINED
This will actually clear the
Customer.EmailAddressCheck field,
but only as long as I remove the REPORT ERROR action. The REPORT ERROR action does seem to roll back previous changes as expected, and as noted previously by chris29:
chris29 wrote:The Report Error will rollback any changes prior to it being called.
This explains why the field was not being reset.
So, the next challenge is: how do I display a pop-up message without rolling back the changes?
I tried the following so far:
1. Use DISPLAY MESSAGE instead of REPORT ERROR in Customer BO rule.
Using the following rule in the Customer BO will yield an "Internal Error" (see
https://www.screencast.com/t/LoXtrFJ3W.
Does anyone know what this message means?
Code: Select all
If Customer.EmailAddress IS DEFINED AND Customer.EmailAddressCheck IS DEFINED AND Customer.EmailAddress<>Customer.EmailAddressCheck Then
Customer.EmailAddressCheckFailed='Yes'
Customer.EmailAddressCheck=UNDEFINED
DISPLAY MESSAGE ASYNCH ClOSABLE TOP_LEFT 'Email Addresses must be identical'
I thought that this message may be due to a warning that appeared (see
https://www.screencast.com/t/0oAU1DiWQwfo), stating that the DISPLAY MESSAGE should be used in processes and not BO rules; so I tried the following.
2. Use DISPLAY MESSAGE in process called by Customer BO rule.
This is the Customer BO rule calling the
Customer_EmailAddressCheck process:
Code: Select all
If Customer.EmailAddress IS DEFINED AND Customer.EmailAddressCheck IS DEFINED AND Customer.EmailAddress<>Customer.EmailAddressCheck Then
Customer_EmailAddressCheck
This is the
Customer_EmailAddressCheck process being called:
Code: Select all
If Customer.EmailAddress IS DEFINED AND Customer.EmailAddressCheck IS DEFINED AND Customer.EmailAddress<>Customer.EmailAddressCheck Then
Customer.EmailAddressCheck=UNDEFINED
DISPLAY MESSAGE ASYNCH ClOSABLE TOP_LEFT 'Email Addresses must be identical'
This time, I don't get the warning message after saving the process, but I do get the same "Internal Error" as before (see
https://www.screencast.com/t/LoXtrFJ3W.
After running out of options I ask:
* How do I display a pop-up message without rolling back the changes in a form?
* Why am I getting the "Internal Error" message described above?
Thanks for your contributions.