on 02-26-2015 7:43 PM
Hello all,
Event-BeforeSave is executed before Validation-OnSave is executed
In Validation-OnSave - I have made a check to throw an error.
After throwing an error, the user fills up the mandatory field and click on save again.
However this time Event-BeforeSave is not executed anymore.
Is this the correct behavior in the system?
Hi Tommy,
The setup you describe should work - well it works for us.
Here is how we do it:
*.bo:
element allowSave : Indicator;
Event-BeforeSave.absl:
if (mandatoryField.IsInitial()) {
this.allowSave = false;
} else {
this.allowSave = true;
}
Validation-OnSave.absl:
return this.allowSave;
Best regards,
Ludger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have an XBO on AP.FO.BusinessPartner.Global:Customer
I have set the breakpoints in Event-Beforesave and Validation-OnSave
The first time it runs, it breaks into Event-Beforesave and then Validation-OnSave which returns false.
The second time when it runs, Event-Beforesave is not executed anymore. Only Validation-OnSave is executed.
Hello Tommy,
This is weird as normally the data has changed. First the field is empty, then you fill it. So it should have a Before-Save triggered in order to save the newly populated field.
Did you try an After-modify to see the difference of behavior after filling the mandatory field?
Best regards.
Jacques_Antoine
Hello Jacques-Antoine,
I've retested it with the BusinessPartner in our internal systemand it worked as described:
Maybe you should raise an incident.
Sorry,
Horst
Hello Tommy,
In Validation-OnSave you must have set the flag to False to throw an error. I think you need to set that flag to True once the mandatory field is filled. This should make the event Before Save to call again.
Regards,
Sumeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.