Creating history for item

If you want create history for item look like backoffice, you can use below example.
[code lang=”java”]public void updateConsignmentStatus(String userUid, ConsignmentModel consignment, ConsignmentStatus status) {
Map originals = new HashMap();
originals.put(ConsignmentModel.STATUS, consignment.getStatus());

consignment.setStatus(status);

Map news = new HashMap();
news.put(ConsignmentModel.STATUS, consignment.getStatus());

final SavedValues savedValues = JaloConnection.getInstance().logItemModification(consignment.getPk(), news, originals, false);
savedValues.setUser(UserManager.getInstance().getUserByLogin(userUid));
modelService.saveAll();
}[/code]

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

This site uses Akismet to reduce spam. Learn how your comment data is processed.