Source: Plm Mechanic Blog

Plm Mechanic Blog Getting a user's recently visited items

I had a comment posted in another blog (Agile PX - Creating an Agile PLM Process Extension ) from Akshay who wanted to know how to get items from the Recently Visited and Navigator panes in the web client. They figured out Recently Visited items, but not Navigator. Navigator doesn't appear to be persisted, so there is little help I can offer, but I thought readers may be interested in knowing how to get the Recent items.The process flow is pretty simple:Get the IUser of interestGet the recently visited IFolderIterate over the IAgileObjects in the IFolder Here's the Code public static void main(String[] args) throws Exception { AgileSessionFactory factory = AgileSessionFactory.getInstance(agileURL); HashMap<Integer, String> params = new HashMap<Integer, String>(); params.put(AgileSessionFactory.USERNAME, agileUsername); params.put(AgileSessionFactory.PASSWORD, agilePassword); session = factory.createSession(params); IUser me = session.getCurrentUser(); IFolder folder = me.getFolder(FolderConstants.TYPE_RECENT_VISIT); ITwoWayIterator iterator = folder.getFolderIterator(); IAgileObject visit; while (iterator.hasNext()) { visit = (IAgileObject) iterator.next(); System.out.println(visit.getName()); } }

Read full article »
Est. Annual Revenue
$5.0-25M
Est. Employees
25-100
CEO Avatar

CEO

Update CEO

CEO Approval Rating

- -/100