‎14-05-2025 03:18 PM
Bonjour,
I would like to know if there are any methods or other solutions for merging objects in VBScript. My aim is to merge numerous pairs of "Org-Units" or "Message Flows", for example. And I would like to do it automatically with VBScript. Thank you in advance if you have any suggestion!
For your information, I'm currently using this version of HOPEX: Aquila 6.1 SP1 CU7
Solved! Go to Solution.
‎22-05-2025 03:56 PM
Thank you so much! It seems to work very well!
I was a long way from finding this solution. ^_^
I just have one question. Is it possible to change the default behaviour for MetaAttributes?
For example, if a source Org-Unit has values for MetaAttributes [E-mail], [Vendor Code], [Comment] or [Org-Unit Status] and his target Org-Unit does not, MEGA defaults behaviour is to keep the empty values of the target Org-Unit.
This is what you see when you run a merge manually. By default, the target's MetaAttributes are ticked (see attached screenshot).
Is it therefore possible, in the VB Script code, to configure the merge MetaWizard to take the MetaAttributes of the source Org-Unit when those of the target are empty?
‎22-05-2025 11:00 AM
Hi, you can try something like this :
Sub MergeObjects(mgRoot, mgobjSource, mgobjTarget)
Dim mgobjWizard
Set mgobjWizard = mgobjSource.Merge.CallFunction("~AfLYxbu47b00[WizardRun]", "~jwqm7IyVL55B[Merge]")
mgobjWizard.Manager.Property("~b2)V)D8PLz1N[Source Object]") = mgRoot.CurrentEnvironment.Toolkit.getString64FromID(mgobjSource.GetId)
mgobjWizard.Manager.Property("~v2)V8E8PLf2N[Target Object]") = mgRoot.CurrentEnvironment.Toolkit.getString64FromID(mgobjTarget.GetId)
mgobjWizard.Manager.Mode = 2
mgobjWizard.run
End Sub
‎22-05-2025 09:46 AM
Bonjour,
If anyone has a solution, I'm always interested.
Since then, what I've seen is that the "Merge" context menu calls the ~z6b1bW0YLb(S[Merge.Implementation] macro.
In the "OnWizTerminate" subroutine of this macro, it's apparently the call to the ~D5mEtmJULrtK[Selected objects merge] method that performs the merge.
But this method doesn't seem to be searchable/visible.
Do you have an example of VB Script code that uses this method and values its input elements?
Thanks again in advance!