Hi Bartosz thanks for your reply , i applied the same code which was given by you, but still no luck, Status is not getting refreshed. Again we need to explicitly click on Refresh work list button for the status to change effect
Actually our requirement is we are assigning workorder to paticular labor and if the labor qualification is not matching with planned labor we are changing the assignment record status to OQFAIL (as the labor qualificaiton failed) - Our Automaton script code also work fine when we assign particular workorder to labor , immediately without clicking on refresh button status is getting chaned to OQFAIL.
But only in one case our script is not working - (the case when we assign particular workorder to labor and if the labor has the same craft but that is not his default craft , in that case we are getting one dialog box Assign Labor , when we click on ok on that dialog box , status is stil showing as Assigned in GRaphical view , (instead of OQFAIL) , we need to explicitly click on Refresh work list button then only status is getting changed to OQFAIL.
Client ask is he dosent want to click on that refresh button explicitly for the status to change to OQFAIL(custom status) . WE wrote below code but however its not calling the Refresh method of the bean class.
curappname=str(service.webclientsession().getCurrentApp().getApp())
if curappname in ("gworkassign","GWORKASSIGN"):
context = UIContext.getCurrentContext()
wcs = context.getWebClientSession()
databean = wcs.getDataBean("assignlabdlg")
if databean is not None:
# Refresh the table.
service.setWarning("enbexpdate", "QualExpirydate",None)
service.setWarning("ENBASS", "ENBASSERROR",params)
context = UIContext.getCurrentContext()
if context:
wcs = context.getWebClientSession()
Utility().sendEvent(WebClientEvent("dialogok",wcs.getCurrentPageId(), "gworkassign", SessionContext(wcs)))
#Utility().sendEvent(WebClientEvent("dialogclose",wcs.getCurrentPageId(), None, SessionContext(wcs)))
appBean = wcs.getCurrentApp()
mainBean = appBean.getAppBean()
mainBean.REFRESH()
mainBean.setCurrentRow(0)
event = wcs.getCurrentEvent()
#service.error("scheduler", "refreshproject")
------------------------------
UTTAM IBBANDI
------------------------------
Original Message:
Sent: Sun October 29, 2023 04:07 PM
From: Bartosz Marchewka
Subject: Invoke Refresh Work List ACtion of Graphical Work Week Application thought Automation Script
Hi Uttam,
Yes it's possible by doing it from automation script level.
Please see the sample jython script:
appInstance = service.webclientsession().getCurrentApp();appBean = appInstance.getBeanForApp();appBean.REFRESH();
------------------------------
Bartosz Marchewka
Original Message:
Sent: Fri October 06, 2023 06:49 AM
From: UTTAM IBBANDI
Subject: Invoke Refresh Work List ACtion of Graphical Work Week Application thought Automation Script
Invoke Refresh Work List ACtion of Graphical Work Week Application thought Automation Script
------------------------------
UTTAM IBBANDI
------------------------------