Skip to Content
1
Former Member
Aug 19, 2014 at 09:08 AM

Syclo WM for Maximo - Creating a WO from SR

68 Views

Hey,

So I've created a new module in the Syclo application which shows all open SR records in the system, allows the user to view/edit/close the SRs. I am trying to add functionality which should allow the user to actually create a WO from a selected SR but I'm running into difficulties.

I have a button which calls an action which calls a transaction with a Java update step, skipping ahead... a snippet of my Java StepHandler is shown below (full Java file attached). As far as I can tell this should tell the backend to use the ticketid and siteid properties to select the correct SR and call the createWorkoder(); function which will create the WO. Needless to say, this doesn't work as of now and I'm wondering if anyone has any guidance for me.

final SRSetRemote set = (SRSetRemote) _mxSession.getMboSet("SR");

set.setQbe("ticketid", ticketid);

set.setQbe("siteid", siteid);

set.setQbeExactMatch(true);

set.reset();

if(!set.isEmpty()) {

debugSet = set;

_user.log( METHOD_NAME + " - test call TicketID: " + ticketid);

SRRemote sr = (SRRemote) set.moveFirst();

sr.createWorkorder();

}

set.save();

Best regards,

Gary

Tags edited by: Michael Appleby

Attachments

CreateWO.txt.zip (1.3 kB)