Refresh & Save MBO on Custom Dialog w/o DialogOk event

Select Action and Buttons are popular controls in Maximo. There is an OOB event "DialogOk" available which can be used to close the dialog and save the changes on MBO. But many times there is a need for us to create a custom action or button which will work with a dialog window. The user will provide input on this dialog box and the UI needs to be refreshed to show the updates after it. There might also be a requirement to do some processing before Save is called and hence OOB DialogOK event can't be used.

#To Close Dialog?and Mark parent to modified=True which internally calls to refresh UI?OOB event. Create an action script and associate it with the button on the dialog. On clicking this button, this action script will be called.

owner = mbo.getOwner()?

if(owner is not None):?
 ? ??
	owner.setModified(True)

service.closeDialog()?        

Service and related methods are not available on old versions of Maximo so it will be recommended to at least have Maximo 7.6.1.2 in case you want to take advantage of this method on automation scripts.

#To Save the record after Closing the Dialog?and setting parent to modified=True.

owner = mbo.getOwner()?

if(owner is not None):????

	owner.setModified(True)

service.closeDialog()

mbo.getThisMboSet().save()?        

The calling of Save() method should be handled as per MBO Customization's Best Practices.

Subhransu Sekhar Sahoo

MAS8 || EAM || GENERATIVE AI || Maximo Advisory Consultant || AI/ML Enthusiastic || Supply Chain || EAM || LANGGRAPH || CrewAI || AWS || Project Management || Integration Architect || Father

2 年

Good post. Before the introduction of service handler, same has been done through two scripts, 1. invoking initialise event on custom dialog mbo (where parent can be set modified to true) and 2.setting the custom logic in the before save of parent mbo.

回复

要查看或添加评论,请登录

Prashant Sharma的更多文章

社区洞察

其他会员也浏览了