This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - How to get History of Item using API

JensRollenmueller - Wednesday, February 27, 2013 2:26 AM:

Hello Community,

how can I get the history of an Item using Aras API ?

e.g.:

Item myPartItem = new Item("Part","get");
myPartItem.setID(">ID<");
Item resultItem = myPartItem.apply();

// Here I wish something like:
Item myPartHistory = resultItem.getHistoryItem();

Regards, Jens



aponceot - Wednesday, February 27, 2013 6:47 AM:

Hi Jens

History is stored in Aras' datamodel.

You can query it like that :

<AML>

  <Item type="History Container" action="get">

    <item_config_id>[  Config_id  ]</item_config_id>

    <Relationships><Item type="History" action="get"></Item></Relationships>

  </Item>

</AML>

Where [  Config_id  ] is the config_id of the Item you want to fetch history.



JensRollenmueller - Wednesday, February 27, 2013 8:21 AM:

Thanks, that worked well !