Hide/Show and Custom function in Creator
Hello,
I tried to do a function where I want to hide/show some fields of the form. Like the following code
- void dossier.showFinanceursFieldsAccordingToPlanFinancement (Dossier dossier) {
- hide dossier.Orient_par_Entreprise;
- }
However creator triggers here an error telling me "
'hide' can be used only in on load actions
"
Do anybody knows a workaround to that situation? Like creating function that only works on load actions for example?
The goal is to avoid code repetition, as currently, I need to copy and paste the same code in both on add > on load + on edit > on load event, which is not very DRY and sustainable.
Thank you!