‎11-06-2014 10:41 AM
Hi all,
I have a macro which I need to run at dispatch of MEGA. I created a macro to insert it as a job and when I run this macro and dispatch it works fine. However now I need to automatically add my job to the dispatchjobs. I found the KB below that explains it is possible of CP11 on MEGA 2009, however we are on CP 6 and this is not going to change in the next months. The article describes of a way of doing this by using a metacommand on the repository metaclass. Is there anyone that can explain what is needed to be done on the repository metaclass in order to setup the behaviour?
http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=501D00000012k6uIAA
Thanks
stijn
Solved! Go to Solution.
‎11-06-2014 02:23 PM
Hi Jerome,
thanks for the info. I'll have a look when we can upgrade to CP10 in order to make use of the new feature.
Regards
stijn
‎11-06-2014 02:03 PM
Hello Stijn
Note that initialization of a job with a MetaCommand on the MetaClass 'Repository' is not an official feature and is not fully reliable. The dispatch job can be lost when using menu File > Refresh or File > Discard.
See this KB
http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=501D00000010EmVIAU
This is why a new feature (Automatic insertion of jobs when dispatching transaction) has been developped as you have identified it (see http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=501D00000012k6uIAA)
If you cannot wait until CP11 is released, contact MEGA support to get the latest hotfix on MEGA 2009 SP5 CP10 (hotfix 10.13 or higher)
‎11-06-2014 12:37 PM
ok thanks gregory.
regards
stijn
‎11-06-2014 11:24 AM
Hi Stijn
You need to create a metacommand on the Repository metaclass and then directly call your code in the body of the macro:
MyInit Sub MyInit() '' your initialization stuff End Sub
This way the code will be called when the user connects to the repository.
I am not sure this method is supported, though.
Gregory