cancel
Showing results for 
Search instead for 
Did you mean: 

Syclo WM for Maximo - Creating a WO from SR

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Gary,

I took your java and threw it in a quick test and confirmed that it worked exactly as expected.  My SR was converted to a workorder without any errors.

I would suggest you double check the user permissions who is trying to execute this to see if the user has the rights to convert the SR to a WO.

--Bill

Former Member
0 Kudos

Hi Bill,

Thanks for testing that for me, at least I know the Java isn't my problem at least   I am using my administrator user for testing (in our test environment) and as such it has all permissions.  I'm unsure exactly where the problem is but I'll continue testing today to see if I can find it.

Thanks again,

Gary

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey,

I just thought I would post a quick reply, I found the problem!  When I created the transaction CreateWorkorder I had left the Discard Null value  set to default (checked - discard transaction if data is not changed) so that when I was clicking the action button to create the workorder the transaction was indeed being called, but since I wasn't changing any of the object values it was being immediately discarded.

As soon as I unchecked the Discard Null parameter everything simply worked.

Happy days, thanks again for the help, it stopped me looking around at my Java long enough to find the fault

Regards,

Gary