Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do validations only allow true or false
#15
ok, I think I understand where you are missing the issue. there are two presave events

- a PRESAVE business action which is a JAVASCRIPT front end call that will be made BEFORE sending the fields in the form to the backend, this can be done using the Business Action or (now) also as a result of a validation map

- a PRESAVE corebos event that is a PHP script that will be called before executing the actual save in the DB, once all the fields have been submitted to the corebos, this event handler can return a "false" state in which case all the information will be resent back to the front end with an error message

https://github.com/tsolucio/corebos/blob/master/modules/Vtiger/Save.php#L95
https://github.com/tsolucio/corebos/blob/master/data/CRMEntity.php#L1201

you can do what you need to do in either, the JS frontend, effectively will require some ajax backend call to get the information from the backend while the event handler in the backend will require a round trip of all the information to the backend and back
Joe
TSolucio
Reply


Messages In This Thread
RE: Do validations only allow true or false - joebordes - 08-10-2020, 05:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)