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

Automatic insert a job at transaction initialization

Solved
Regular Contributor

Automatic insert a job at transaction initialization

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

4 Replies
Contributor

Re: Automatic insert a job at transaction initialization

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

  

 

Regular Contributor

Re: Automatic insert a job at transaction initialization

ok thanks gregory.

 

regards

 

stijn

MEGA

Re: Automatic insert a job at transaction initialization

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)

 

 

Jerome
Regular Contributor

Re: Automatic insert a job at transaction initialization

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