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

Mega Object History retrieval

ColruytTeam
Honored Contributor

Hello,

Is there a API to retrieve history(Value) of the mega object..
I am trying to retrieve the 'value' attribute of the History object.

See attachment.

Thanks,
Kartik Jalla
Colruyt Group

Colruyt Team
1 Reply

jhorber
MEGA
MEGA

Hello ColruytTeam 

 

There are no dedicated API functions for this.
However, when repository log is enabled, a repository objet (MetaClass ~l20000000(20[ChangeItemDataPublic])  is created for each elementary changes.
You can use standard repository API  function to browse log elements related to the object

 

I am not aware of a official document on this matter. Here is a bootstrap (VB script)

 

Set oObj = GetObjectFromId("~jdSQHrcmOrgD[AAA]")
Set cHistory = oObj.GetCollection("~Z1000000CS50[ChangeItemDataPublic Log]")
For each oItem in cHistory
  Print "----------------------------------------------"
  Print "Action: " & oItem.GetProp("~830000000X80[Command Operator]","Display")
  Print "Target: " & oItem.GetProp("~130000000580[MetaConcept]","Display")
  Print "Value: " & oItem.GetProp("~730000000T80[Minor IdAbs]","Display")
  Print "Date: " & oItem.GetProp("~610000000P00[Modification Date]","Display")
  Print "Modifier: " & oItem.GetProp("~b10000000L20[Modifier]","Display")
  Set cIA = oItem.GetCollection("~K1000000CW40[MetaAttribute]")
  s = ""
  For each oIA in cIA
     s = s & oIA.GetProp("Name") & ","
  Next
  Print "Impacted MetaAttribute(s): " & s
Next

 

 

 

 

Jerome