How to add History using a custom method?

I want to log in History when a specific "Action" is performed on a "Part" . I try to do this by adding to the "History" table. I do get a response that the record is added, However, I do not see a record in the database, neither visible in the History View. I try to do this by invoking "History Daemon" identity.

How can i achieve this in Aras?

<AML>
<Item action='add' type='History'>
<action>Special Action</action>
<source_id>#######ITEM HISTORY CONTAINER ID#############/source_id>
<comments>Attempted Special Action</comments>
<item_id>#######ITEM ID##############</item_id>
</Item>
</AML>




Parents
  • Hi Sathish

    I'm able to add the history to part and able to see in Part History in UI as well as in SQL table. I added Super User to History Daemon identity

    AML Query

    <AML>
    <Item action='add' type='History'>
    <action>Special Action</action>
    <source_id>CA2BB86909A443A6B241253A7BDEEC50</source_id>
    <comments>Attempted Special Action</comments>
    <item_id>{PartID}</item_id>
    </Item>
    </AML>

    SQL Query

    SELECT * FROM [innovator].[HISTORY]
    WHERE COMMENTS = 'Attempted Special Action'

  • Interesting. The same doesn't work for me in SP11. Can you confirm,if the CREATED_ON_TICK value is populated in the HISTORY table? The AML does not pass any value for this field. Does the API calculate this automatically?

Reply Children