2 replies Latest Post - ‏2013-05-07T16:21:25Z by Feodor
3 Posts

Pinned topic Set owner from related record table

‏2013-05-06T07:45:54Z |

Our concept is to add the "select owner" button next to the each ticket in the "related ticket" table (see attachment) .This way, we can change the owner directly  from the "related ticket" list instead of entering each ticket. A similar implemantation exist in the activity list of the SR and INC applications - user can select owner/route WF/ change status/  Apply WF directly form table row.
Any idea how we can do it?


  • scottsd
    121 Posts

    Re: Set owner from related record table

    ‏2013-05-06T14:08:01Z  in response to Feodor

    Hi Feodor, unfortunately the default dialogs for Select Owner, Route WF, Change Status, etc default to the main MBO associated with the Application.  As I think you've probably seen in your testing.  If you use the default Select Owner dialog, it changes the owner of the current SR, not the related record.


    You need your own clone of the Select Owner dialog with special UI bean code that instead of calling the Change Owner on the main MBO, looks up the currently selected record from the visible table and changes that record.


        DataBean appBean     = app.getAppBean();
            DataBean ownerBean     = app.getDataBean(TSDOWNER);
            WebClientEvent event = sessionContext.getCurrentEvent();
            int row = getRowIndexFromEvent(event);

    ((WORemote) workorder).applyOwner(getMbo(row).getString("personid"));


    some code that kind of looks like this that above, the key is the getRowIndexFromEvent code.