cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to call a macro before save/dispatch

aalarc
Contributor

We have a requirement to run a few mandatory validations before the user saves his work.

 

Is there a way to call a macro before the changes are saved? Or if not, what is the best way to run a validation prior to save/dispatch, without the user clicking a custom validation button.

 

We tried a few things already but this does not solve our requirement.

1. implement Function OnPropertyPageApply(Page as MegaPropertyPageStandard) in the CommandHandler macro.
2. implement Function CheckPropertyPage(Page as MegaPropertyPageStandard) in the CommandHandler macro.
3. Put "Mandatory(Always)" for the metaAttribute in the MetaPropertyPage.

 

Results:
(1, 2) Works in Thick client but not in Thin Client.
(3) If implemented for list view attributes (attributes that you need to CONNECT a value). The application will display the error even if there is a value connected. The user is required to select the entry to bypass the validation.

 

Thank you.

2 Replies

Hi Jerome!

 

Thank you for thre reply. Will try this out (if can be applied to v2r1).

jhorber
MEGA
MEGA

Hello

 

In old versions, there was a specific configuration to trigger a macro at dispatch

See https://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=501D00000010EmVIAU

Jerome