Saturday 28 November 2020

Copy WF Memo to Status Memo in View History of Status dialog | Maximo

Copy the Memo from the MANUAL INPUT of the workflow dialog into Memo field of CHANGE STATUS in View History Dialog of any application. 

Both Memos are different , one is coming from wftransaction, and the other one is in the xxstatus table. 

We were trying to cross over the memo from Wftrancation to status table's memo. 

here is the solution we developed using automation script in jyton. 
In my example i am using PR object and PRSTATUS table.

1. Make a relationship from WFTRANSACTION to PR
RelationShip Name: PR
Child Object: PR
Where Clause: prid = :ownerid and :ownertable = 'PR'

1. Object Launch Point 
Object : WFTRANSACTION
Events: SAVE, Add, After Save
wftmemo = mbo.getString("memo")
if (wftmemo!=''):
    prset = mbo.getMboSet("pr")
    pr = prset.moveFirst()
    if pr is not None:
        prstatusset = pr.getMboSet("prstatus")
        prstatus = prstatusset.moveLast()
        prstatus.setValue("memo",wftmemo,2L)
        #prstatusset.save()

 

No comments:

Post a Comment