Trigger a Formula script on opening a dialog?
Collapse
X
-
Hi,
I think that there is a good deal of confusion about formula.
Formula is an Espo created language/facility that makes possible for non-coders to write PHP beforeSave hooks in a friendly manner and store them in metadata, but at the end of the day formula scripts are only back end beforeSave hooks and are completely separated from the Javascript/Backbone front end.
Thus, it is not possible for front end events to trigger a formula script, unless that event is saving the model.
It is possible to update model attributes and collections in response to front end events but that will require writing javascript code in the record or field view classes.
If you are interested in learning more about the front end structure, you can check out these postings.
The idea of this thread is to create a "road map/guide" to help developers find where GUI sections or elements are defined within Espo code so customization projects can be implemented without having to spend a lot of time "finding your way around" the code (like many of us have done) whenever possible.
One of the most frustrating things when I started to work with Espo was that lacking experience with the Backbone.js framework, on which Espo front end is based, I could not understand which scripts needed to be modified to customize an entity's detail display or why when I made modifications things wouldn't seem to work.
Hope this helps.Leave a comment:
-
Trigger a Formula script on opening a dialog?
Hi
I wanna inject some data into a field. E.g. the user opens a Case from the bottom panel on a Sales Order Items. The Sales Order Item is injected to the cases Sales order field. Great.
But the Account name.
Now I can do it with a Formula script. But the data is first injected when I save.
Is it possible to do it when opening the dialog?Tags: None
Leave a comment: